#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<ll,ll> ii;
typedef vector<int> vi;
typedef unsigned long long ull;
typedef long double ld;
typedef tree<ii, null_type, less<ii>, rb_tree_tag, tree_order_statistics_node_update> pbds;
char a[55][55];
ll f[111];
const ll INF = ll(1e18)+1201;
ll add(ll a, ll b)
{
a+=b;
return min(a,INF);
}
bool used[133];
ii dp[55][55];
ll test(int n, int m)
{
dp[0][0]=mp(1,0);
for(int i=0;i<n;i++)
{
for(int j=0;j<m;j++)
{
if(a[i][j]=='X')
{
dp[i][j+1].fi+=dp[i][j].fi;
dp[i][j+1].se+=dp[i][j].se;
dp[i+1][j].fi+=dp[i][j].fi;
dp[i+1][j].se+=dp[i][j].se;
}
else if(a[i][j]=='r')
{
dp[i][j+1].se+=dp[i][j].fi;
dp[i][j+1].se+=dp[i][j].se;
}
else if(a[i][j]=='d')
{
dp[i+1][j].fi+=dp[i][j].fi;
dp[i+1][j].fi+=dp[i][j].se;
}
else
{
dp[i+1][j].fi+=dp[i][j].fi;
dp[i][j+1].se+=dp[i][j+1].se;
}
}
}
return add(dp[n-1][m-1].fi,dp[n-1][m-1].se);
}
int main()
{
ios_base::sync_with_stdio(0); cin.tie(0);
f[0]=1;
f[1]=1;
for(int i=2;i<=100;i++) f[i]=add(f[i-1],f[i-2]);
vector<int> vec;
ll k; cin>>k;
int n,m;
if(k<=19)
{
n=m=5;
}
else
{
n=m=45;
}
int mx=-1;
for(int i=2*(n-2);i>=0;i--)
{
if(k>=f[i])
{
k-=f[i]; used[i]=1; mx=max(mx,i);
}
}
for(int i=0;i<n-1;i++) a[i][m-1]='d';
for(int i=0;i<m-1;i++) a[n-1][i]='r';
a[n-1][m-1]='.';
if(mx%2==0)
{
for(int i=0;i<n-1;i++)
{
for(int j=0;j<m-1;j++)
{
a[i][j]='.';
}
}
for(int i=0;i<=mx/2;i++)
{
for(int j=0;j<=mx/2;j++)
{
a[i][j]='X';
}
}
for(int i=1;i<=mx/2;i++)
{
if(!used[2*(i-1)]) a[i][i-1]='r';
for(int j=0;j<i-1;j++)
{
a[i][j]='d';
}
}
for(int i=0;i<mx/2;i++)
{
if(!used[2*i+1]) a[i][min(i+2,mx/2)]='d';
for(int j=i+3;j<=mx/2;j++) a[i][j]='r';
}
a[mx/2][mx/2]='r';
}
else
{
mx++;
for(int i=0;i<n-1;i++)
{
for(int j=0;j<m-1;j++)
{
a[i][j]='.';
}
}
for(int i=0;i<=mx/2;i++)
{
for(int j=0;j<=mx/2;j++)
{
a[i][j]='X';
}
}
for(int i=1;i<=mx/2;i++)
{
if(!used[2*(i-1)]) a[i][i-1]='r';
for(int j=0;j<i-1;j++)
{
a[i][j]='d';
}
}
if(!used[mx-2])
{
a[mx/2-1][mx/2-1]='r';
}
else
{
}
a[mx/2-1][mx/2]='r';
for(int i=0;i<mx/2;i++)
{
if(!used[2*i+1]) a[i][min(i+2,mx/2)]='d';
for(int j=i+3;j<=mx/2;j++) a[i][j]='r';
}
a[mx/2][mx/2]='.';
}
for(int i=0;i<=mx/2;i++)
{
for(int j=mx/2+1;j<m-1;j++) a[i][j]='r';
}
for(int i=mx/2+1;i<n-1;i++)
{
for(int j=0;j<=mx/2;j++) a[i][j]='d';
}
//cerr<<test(n,m)<<'\n';
cout<<n<<' '<<m<<'\n';
for(int i=0;i<n;i++)
{
for(int j=0;j<m;j++)
{
cout<<a[i][j];
}
cout<<'\n';
}
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNpbmNsdWRlIDxleHQvcGJfZHMvYXNzb2NfY29udGFpbmVyLmhwcD4KI2luY2x1ZGUgPGV4dC9wYl9kcy90cmVlX3BvbGljeS5ocHA+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwp1c2luZyBuYW1lc3BhY2UgX19nbnVfcGJkczsKIAojZGVmaW5lIGZp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