3 9
3 3 D
1 2 U
3 1 D
1 3 U
1 1 U
2 3 R
3 2 U
2 1 D
2 2 D
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define debug() puts("I WILL AK")
#define N 100007
mt19937 rnd(time(0));
pair<int,int> g[N];
int ct;
#define M 7
signed main(){
freopen("1.in","w",stdout);
int n=rnd()%M+1;
n=3;
int m=rnd()%(n*n)+1;
cout<<n<<' '<<m<<'\n';
for(int i=1;i<=n;++i){
for(int j=1;j<=n;++j){
g[++ct]={i,j};
}
}
random_shuffle(g+1,g+n*n+1);
for(int i=1;i<=m;++i){
cout<<g[i].first<<' '<<g[i].second<<' ';
int op=rnd()%4;
if(op==1) puts("R");
if(op==2) puts("U");
if(op==3) puts("L");
if(op==0) puts("D");
}
return 0;
}