#include<stdio.h>
w
,h
;main
(i
){for(;scanf("%d%d",&h
,&w
),i
=w
*h
;puts(""))for(++i
;--i
;)putchar(46-(((i
-1)/w
+1)%h
<2||i
%w
<2)*11),!(i
%w
-1)&&puts("");}
I2luY2x1ZGU8c3RkaW8uaD4KdyxoO21haW4oaSl7Zm9yKDtzY2FuZigiJWQlZCIsJmgsJncpLGk9dypoO3B1dHMoIiIpKWZvcigrK2k7LS1pOylwdXRjaGFyKDQ2LSgoKGktMSkvdysxKSVoPDJ8fGkldzwyKSoxMSksIShpJXctMSkmJnB1dHMoIiIpO30=