#include typedef long long ll; const int INF = 1e9,MOD = 1e9+7,ohara = 1e6; const ll LINF = 1e18; using namespace std; #define rep(i,n) for(ll (i)=0;(i)<(int)(n);(i)++) #define rrep(i,a,b) for(ll i=(a);i<(b);i++) #define rrrep(i,a,b) for(ll i=(a);i>=(b);i--) #define all(v) (v).begin(), (v).end() #define pb(q) push_back(q) #define Size(n) (n).size() #define Cout(x) cout<<(x)<>n>>k; ll lim=Size(n); while(1){ if(lim-cnt==0)break; while(n[cnt]=='0'){ cnt++; } pos=n[cnt]-'0'; if(pos>=6){ pos=pos%6; string co; co=to_string(pos); n[cnt]=co[0]; } else{ cmp=pos*10; pos=n[cnt+1]-'0'; cmp=cmp+pos; //cout<