# Python 3, 139 bytes <!-- language: lang-py --> n=int(input()) for i in range(9):w=(3*' ||')[i];s=' / /\/ /\_ /\ \/\__ \/\ \/_ \/ /\/ /'[i::9]*n;s=(s,' '+s[1:-1]+' ')[i%4>1];print(w+s+w) This one was pretty easy, just build and print at once line by line Heres the code in ungolfed form: <!-- language: lang-py --> n=int(input()) # The list with all the knot pieces l= [' __ ', '/ \\', ' /\/', '/\/ ', '\ \/', '/\ \\', ' /\/', '/\/ ', '\__/'] # The first and last columns w = ' || || ' # Loop for each row for i in range(9): # Exception for the first and last character in the knot (in some rows) s = l[i]*n if i % 4 > 1: s = ' ' + s[1:-1] + ' ' # Print the knot for this row print(w[i] + s + w[i])