Puzzling Language

题意翻译

**【题目描述】** 现有一种由 [Brainfuck](https://baike.baidu.com/item/Brainfuck/1152785)(以下称为 BF)衍生出的二维编程语言。本题中,你需要编写一个可以生成该语言代码的简易生成器。 该语言的代码是字符 `.` 和 `X` 形成的矩阵,且可以按照下面的方式转换为 BF 程序:以正常顺序(从上到下、从左到右)阅读代码中的字符,每个 `X` 会被转换成 BF 指令,之后会运行这些指令。转换成的指令由这个 `X` 左边、上面和右边相邻的三个字符确定,见如下转换表: ![img](https://cdn.luogu.com.cn/upload/vjudge_pic/CF952G/de5a0c0bfa2fbc80e44dad1d8d7c9310dc043297.png) 给你一个字符串,请你输出一个以该语言编写的、能打印出这个字符串的程序。 你可以在[这里](https://assets.codeforces.com/rounds/952/puzzling-interpreter.cpp)下载该语言的解释器(用 C++11 编译),这个解释器也将用于评测你的程序。需要注意下面一些实现的细节: - 解释器会先将该语言的代码转换成 BF 程序,然后会运行该 BF 程序并输出结果。 - 代码必须是矩形,所有行的长度必须相同。代码最多有 $10^4$ 行和 $10^4$ 列,最多有 $5 \times 10^5$ 个字符 `X`。 - 代码的第一行和最后一行上下相邻,第一列和最后一列左右相邻。 - 解释器有 $3 \times 10^4$ 个存储单元,每个可以存储 $0$ 到 $255$ 的整数,运算结果对 $256$ 取模。若当前处于第一个存储单元,则指针左移(`<`)指令会被忽略;若当前处于最后一个存储单元,则指针右移(`>`)指令会被忽略。 - 在 BF 程序中可以出现控制台输入(`,`)指令,但运行时会将其忽略。 **【输入格式】** 输入一个字符串,其中每个字符的 ASCII 码都在 $33$(`!`)到 $122$(`z`)之间(含)。字符串的长度在 $1$ 到 $10$ 之间(含)。 **【输出格式】** 输出一个以该语言编写的程序,运行该程序时会打印出给定的字符串。 **【样例 1 解释】** 样例 1 输出的程序对应下面的 BF 程序: ``` - >+< >+++< >+++++< >+++++++< >+++++++++< >+++++++++++< < > . . . ``` 三角形部分表示将第一个存储单元的值减一,并将第二个存储单元的值设为 $36$,也就是字符 `$` 的 ASCII 码。接下来一行表示将指针移动到第二个存储单元。接下来三行表示将当前存储单元的值对应的字符(`$`)打印三次。

题目描述

In this problem you will write a simple code generator for a 2D programming language derived from [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck). The code in this language is a rectangular grid of characters '.' and 'X'. The code is converted to a Brainfuck program as follows: the characters are read in the usual order (top to bottom, left to right), and each 'X' character is converted a Brainfuck instruction to be executed. The instruction is defined by the left, top and right neighbors of the 'X' character using the following conversion table: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF952G/de5a0c0bfa2fbc80e44dad1d8d7c9310dc043297.png)You are given a string. Output a program in the described language which prints this string. You can download the language interpreter used for judging here: <https://assets.codeforces.com/rounds/952/puzzling-interpreter.cpp> (use C++11 to compile the code). Note several implementation details: - The first step of the language interpretation is conversion to a Brainfuck program, which is then executed. - The code must be rectangular, with all lines of the same length. It can have at most 10,000 lines and 10,000 columns, and can have at most 500,000 'X' characters. - The code has toroidal topology, i.e. the 'X' on the first line will have top neighbor in the last line. - Brainfuck interpreter has 30000 memory cells which store integers from 0 to 255 with increment/decrement done modulo 256. - Console input (, command) is allowed in Brainfuck code but has no effect when executed.

输入输出格式

输入格式


The input consists of a single string of characters with ASCII codes between 33 ('!') and 122 ('z'), inclusive. The length of the string is between 1 and 10 characters, inclusive.

输出格式


Output a program in the described language which, when executed, will print the given message.

输入输出样例

输入样例 #1

$$$

输出样例 #1

.......X.......
......XXX......
.....XXXXX.....
....XXXXXXX....
...XXXXXXXXX...
..XXXXXXXXXXX..
.XXXXXXXXXXXXX.
...............
X.............X
X..............
X..............
X..............

说明

The example corresponds to the following Brainfuck program: ` -<br></br> >+<<br></br> >+++<<br></br> >+++++<<br></br> >+++++++<<br></br> >+++++++++<<br></br> >+++++++++++<<br></br><br></br>< ><br></br>.<br></br>.<br></br>.<br></br>`The triangular block decrements the first memory cell and sets the value of the second memory cell to 36 - the ASCII code of '$' character. The next line after the triangular block moves the memory pointer to the second memory cell, and the next three lines print the '$' character three times.