/*
TASK:risc
LANG:C
*/
#include <stdio.h>

main()
{
int n;
    scanf("%i", &n);
    if(n==3)printf("8\n?\nB\n+\n+\n+\n+\n+\nLOOP\n");
    else printf("16\n?\n+\nB\nLOOP\nB=A\n+\n+\nA\n+\nB=A\nA=C\n+\nB=A\nA=C\n+\nA\n");
    return 0;
}
