1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#include <cstdio>

char tape[1000];
char* ptr = tape;

#define f ++ptr;
#define b --ptr;
#define p ++*ptr;
#define m --*ptr;
#define r *ptr=getchar();
#define w putchar(*ptr);
#define i while(*ptr){
#define j }

int main() {
p i r m m m m m m m m m m j f p f f p p b b b r p i m f i m f p f f p b b b j f f f i m b b b p f f f j p b b i m i b b m m m m m m m m m m i m m m m m m m m m m m m m m m m m m m m m m i i m j f i m j f f f m b b b b j j f f f f i m b m b b i m j p f f f j b b m j f f i b b b b m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m i p p p p p p p p p p p p p p p p p i i m j f i m j b j f f f f i m j b b b b j f f f f i m b b b i m j p p f f f j j b b j f f i b b b b m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m i i m j f f f f m b b b b j f f f f i m b b b i m j p f f f j j b b b b r p f f f i m b p f f p b j f i m b p f j p b b i i m j f f m b b j f f i m b b b i m j b i m j f f f f j b b b b j f m m f f m b b i i m j f f p b b j f f p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p w f p p p p p p p p p p w f p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p w b w f w b p p p p p p p p p p p p p p p p p p p p p p w f m w 
}