import sys


def main():
	xs = [1]

	for line in sys.stdin:
		tokens = line.split()

		if tokens[0] == "noop":
			xs.append(xs[-1])
		else:
			op_str, arg_str = tokens
			xs.append(xs[-1])
			xs.append(xs[-1] + int(arg_str))

	grid = [['.'] * 40 for _ in range(6)]

	for cycle, sprite_x in enumerate(xs[:-1]):
		crt_y, crt_x = divmod(cycle, 40)
		grid[crt_y][crt_x] = ".#"[abs(sprite_x - crt_x) <= 1]

	for row in grid:
		print(''.join(row))


if __name__ == "__main__":
	main()
