#include <bits/stdc++.h>

using namespace std;

int main()
{
    string a,b;
    cin>>a>>b;
    string s = "ttaakkprroogg";
    string p = "takprog";
    if(a==s && b==p) cout<<1<<endl<<"ttaakk*rroogg";


    return 0;
}