IN A
IN B
MOV C 0
MOV D 1
CMP B C
JNZ 37
IN E
IN F
IN G
CMP E D
JZ 24
IN H
MOV A F
CMP A G
JZ 34
LOAD A E
ADD E H
STORE A E
ADD A D
CMP C C
JNZ 14
CMP C C
JNZ 34
MOV H C
MOV A F
CMP A G
JZ 33
LOAD A E
ADD H E
ADD A D
CMP C C
JNZ 26
OUT H
SUB B D
CMP C C
JNZ 5
RETURN