#include<iostream>#include<algorithm>#include<cmath>#include<cstring>#include<vector>#include<unordered_map>#include<unordered_set>#include<set>#include<map>#defineendl'\n'#defineIOSios::sync_with_stdio(false); cin.tie(0); cout.tie(0)usingnamespace std;constdouble pi =acos(-1);typedeflonglong ll;string go(int ex,int ey,int&d,int sx,int sy){string ans ="";if(ex < sx && d !=1){if(d ==0) ans +="c";if(d ==2) ans +="u";if(d ==3) ans +="cc";d =1;}if(ex > sx && d !=3){if(d ==0) ans +="u";if(d ==1) ans +="cc";if(d ==2) ans +="c";d =3;}ans +=string(abs(ex - sx),'f');if(ey < sy && d !=0){if(d ==1) ans +="u";if(d ==2) ans +="cc";if(d ==3) ans +="c";d =0;}if(ey > sy && d !=2){if(d ==0) ans +="cc";if(d ==1) ans +="c";if(d ==3) ans +="u";d =2;}ans +=string(abs(ey - sy),'f');return ans;}string go2(int ex,int ey,int&d,int sx,int sy){string ans ="";if(ey < sy && d !=0){if(d ==1) ans +="u";if(d ==2) ans +="cc";if(d ==3) ans +="c";d =0;}if(ey > sy && d !=2){if(d ==0) ans +="cc";if(d ==1) ans +="c";if(d ==3) ans +="u";d =2;}ans +=string(abs(ey - sy),'f');if(ex < sx && d !=1){if(d ==0) ans +="c";if(d ==2) ans +="u";if(d ==3) ans +="cc";d =1;}if(ex > sx && d !=3){if(d ==0) ans +="u";if(d ==1) ans +="cc";if(d ==2) ans +="c";d =3;}ans +=string(abs(ex - sx),'f');return ans;}intmain(){IOS;int T;cin >> T;while(T --){int ex, ey, d;cin >> ex >> ey >> d;int n;cin >> n;string ans ="";for(int i =1; i <= n; i ++){int sx, sy;cin >> sx >> sy;int d1 = d, d2 = d;string t1 =go(ex, ey, d1, sx, sy);string t2 =go2(ex, ey, d2, sx, sy);if(t1.size()< t2.size()) ans += t1, d = d1;else ans += t2, d = d2;ex = sx, ey = sy;}cout << ans << endl;}return0;}