// morze.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <string>
using namespace std;
string egy = ".----", ketto="..---",harom="...--",negy="....-",ot=".....";
string hat = "-....", het = "--...", nyolc = "---..", kilenc = "----.", nulla = "-----";
bool egyb,kettob,haromb,negyb,otb,hatb,hetb,nyolcb,kilencb,nullab;
string s;
int main()
{
getline(cin, s);
for (int i = 0; i < s.size(); ++i)
{
if (egy[i % 5] != s[i]) egyb = true;
if (ketto[i % 5] != s[i]) kettob = true;
if (harom[i % 5] != s[i]) haromb = true;
if (negy[i % 5] != s[i]) negyb = true;
if (ot[i % 5] != s[i]) otb = true;
if (hat[i % 5] != s[i]) hatb = true;
if (het[i % 5] != s[i]) hetb = true;
if (nyolc[i % 5] != s[i]) nyolcb = true;
if (kilenc[i % 5] != s[i]) kilencb = true;
if (nulla[i % 5] != s[i]) nullab = true;
if (i % 5 == 4)
{
if (!egyb) cout << "1";
else if (!kettob) cout << "2";
else if (!haromb) cout << "3";
else if (!negyb) cout << "4";
else if (!otb) cout << "5";
else if (!hatb) cout << "6";
else if (!hetb) cout << "7";
else if (!nyolcb) cout << "8";
else if (!kilencb) cout << "9";
else if (!nullab) cout << "0";
egyb = false;
kettob = false;
haromb = false;
negyb = false;
otb = false;
hatb = false;
hetb = false;
nyolcb = false;
kilencb = false;
nullab = false;
}
}
return 0;
}
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu
// Tips for Getting Started:
// 1. Use the Solution Explorer window to add/manage files
// 2. Use the Team Explorer window to connect to source control
// 3. Use the Output window to see build output and other messages
// 4. Use the Error List window to view errors
// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file