#include using namespace std; using ll=long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); char s,e; int N; cin>>s>>e>>N; if(s==e){ cout<