```for i in range(0,len(flag)):    print(chr(ord(flag[i])>>8), end="")    print(chr(int(bin(ord(flag[i]))[9:], 2)),end="")```The flag is converted to another string consisting of 16-bit characters of half the length from original size, after doing some research and searching for the correct python functions, I thought that what I needed to do was to convert each character of the encoded string of strange characters into binary, and then discard the first 8 bits, but this is the first problem of the problem. The second stage started when I saw the output and said: -Damn, half of this flag is missing! Then I started to examine the encryption algorithm in a little more detail and I realized this. The length of the flag is skipped by twos, and after eight zeros are added to the beginning of the expression showing the flag index in each loop, the next index of the flag is added to this statement, and the encrypted flag is exactly that. At this point, I have reversed everything, I hope you will understand easily if you read my code well. The reason why I got after the 9th index of the binary is that python's bin function adds the letter 'b' before the extra last bit, and if the bin function normally gave the binary, I would take after the 8th index and print it.