#include<bits/stdc++.h>
#define db double
#define ll long long
#define mid ((l + r) >> 1)
#define pb push_back
#define ri int
#define resetIO(x) \
freopen(#x ".in", "r", stdin), freopen(#x ".out", "w", stdout)
#define TIME (1e3 * clock() / CLOCKS_PER_SEC)
using namespace std ;
const int N = 110 ;
template <typename T>
inline void read(T&x){
x = 0 ; char c = getchar() ; bool flg = 1 ;
while(c > '9' || c < '0'){if(c == '-')flg = 0 ; c = getchar() ;}
while(c >= '0' && c <= '9'){x = (x << 1) + (x << 3) + (c ^ 48) ; c = getchar() ;}
x = flg ? x : -x ;
}
template <typename T,typename ...Args>
inline void read(T&x,Args&...args){read(x),read(args...);}
bool m_bg ;
mt19937 rnd(time(0)) ;
int x1,y1,x2,y2,n,m,Q ;
char s[N][N] ;
bool m_ed ;
signed main(){
freopen("data.in","w",stdout) ;
n = 6 , m = 7 ; Q = 5 ; printf("%d %d %d\n",n,m,Q) ;
for(ri i = 1 ; i <= n ; i++){
for(ri j = 1 ; j <= m ; j++){
s[i][j] = (rnd()%10<3?'#':'.') ;
}
}
s[x1=rnd()%n+1][y1=rnd()%m+1]='A' ;
while(1){x2=rnd()%n+1,y2=rnd()%m+1 ; if(x2!=x1||y2!=y1)break ;}
s[x2][y2] = 'B' ;
for(ri i = 1 ; i <= n ; i++){
for(ri j = 1 ; j <= m ; j++){
putchar(s[i][j]) ;
}
putchar('\n') ;
}
for(ri i = 1 ; i <= Q ; i++)printf("%d %d\n",rnd()%n+1,rnd()%m+1) ;
return 0 ;
}