#include <bits/stdc++.h>
int main(void) {
  int point_a, point_b, i;
  scanf("%d %d", &point_a, &point_b);
  printf("A:");
  for (i = 1; i <= point_a; i++) {
    printf("]");
  }
  printf("\n");
  printf("B:");
  for (i = 1; i <= point_b; i++) {
    printf("]");
  }
  printf("\n");
  return 0;
}
