Within PhysioNet/Computing in Cardiology Challenge 2021, we developed a two-phase method of automatic ECG recording classification. In the first phase, we pre-trained a model on a large training set with our proposed mapping of original labels to the SNOMED codes, using three-valued labels. To solve the multilabel binary classification task, we used a deep convolutional neural network, which is a 1D variant of the popular ResNet50 network. In the second phase, we performed fine-tuning for the Challenge metric and conditions. In the official round, our team CeZIS obtained the Challenge metric score of 0.717, 0.680, 0.703, 0.702, and 0.681 on the 12-lead, 6-lead, 4-lead, 3-lead, and 2-lead validation datasets, respectively.