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