import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { char[] arr = new char[n]; for (int j = 0; j < n; j++) { if ((i + j) % n < k) { arr[j] = '#'; } else { arr[j] = '.'; } } sb.append(arr).append("\n"); } System.out.println(sb); } }