#include #include #include #include using namespace std; int main() { ifstream fin; fin.open("keyboard.in"); if (!fin.good()) throw "I/O error"; int n; string s; fin >> n; fin >> s; ofstream fout; fout.open("keyboard.out", ios::app); if (!fout.good()) throw "I/O error"; string keyboard = "pyfgcrlqjaoeuidhtnskxbmwvz"; //random_shuffle(keyboard.begin(), keyboard.end()); fout << keyboard << endl; int a, b; if (s[0] != s[1]) { a = keyboard.find(s[0]) + 1; b = keyboard.find(s[1]) + 1; } else { a = keyboard.find(s[0]) + 1; b = keyboard.find(s[2]) + 1; } double a1=a; if(a>10 && a<20) a1 = a-10+0.5; else if(a>19) a1 = a -19+0.9; double b1=b; if(b>10 && b<20) b1 = b-10+0.5; else if(b>19) b1 = b -19+0.9; if(a1>b1) swap(a,b); fout << a << " " << b << endl; return 0; }