# Author: Steven Carr # Last Edited: October 2021 import stdio import sys # User input n = int(sys.argv[1]) # Set dragon and nogard to F for one unit forward dragon = 'F' nogard = 'F' # For an integer in the range of 1 to n, # go n - 1 followed by an L, followed by another n - 1 # in reverse order, replacing L with R, and so on for i in range(1, n+1): temp = dragon dragon = dragon + 'L' + nogard nogard = temp + 'R' + nogard # Output the path of the dragon curve to the # n number stdio.writeln(dragon)