+[
  >>,>++++[-<-------->]
  +<[<[-]>[-<+>]>-]>[<<<->>>>]
  <<<<
]
>>
+[
  >>,+>
  +<[<[-]>-[-<+>]>-]>[-<<<->>>>]
  <<<<
]
<[->>[-<+>>+<]>[-<+>]<<<]
>>[-]++<
#
n[n->d-[>r+>X]>Yr?[r+[-<d+>]>>Y]Y<<<<n]
>>r>-<
[
  +++++++++[->++++++++>++++++++++<<]>.>..>
]
>[
  +++++++++++[->+++++++>++++++++++++>++++++++++>+++++++++++<<<<]>-.>--.>+.>.
  >
]