Rating:

1. Decompile the class file
2. Rewriting the java program into a python program, because I am more comfortable in python
3. Bruteforcing the flag char by char

```py
# p_ctf{0r1g1n4|_n@M3-0f_J4vA_Wa5_()/\|<}
import sys
sys.setrecursionlimit(10**6)
data = [28767, 24418, 25470, 29771, 26355, 31349, 13032, 30456, 14663, 27592, 8916, 29409, 7348, 17474, 5124, 3345, 49357, 61058, 65159, 53773, 67886, 72426, 103728, 158125, 179542, 166504, 212101, 282674, 320873, 329272, 400021, 479881, 535081, 599886, 662294, 731441, 831284, 947032, 1021482]

def t_helper(idx, arr):
if (arr[idx] != -1):
return arr[idx]
elif (idx == 0):
arr[0] = 0;
return arr[0];
elif (idx == 1):
arr[1] = 1;
return arr[1];
elif (idx == 2):
arr[2] = 3;
return arr[2];
else:
arr[idx] = 3 * t_helper(idx - 1, arr) - 3 * t_helper(idx - 2, arr) + t_helper(idx - 3, arr);
return arr[idx];

def t(idx):
arr = []
for i in range(idx + 1):
arr.append(-1)
return t_helper(idx, arr)

def UnicodePack(input):
arr = []
for i in range(len(input)):
arr.append((ord(input[i]) << 8) + ord(input[(i + 1) % len(input)]))
return arr

flag = "p_"
idx = len(flag)-1
while "}" not in flag:
for ch in range(32, 127):
tmp = flag + chr(ch)
packed = UnicodePack(tmp)
if (packed[idx] ^ t(idx * idx)) == data[idx]:
idx += 1
flag += chr(ch)
break
print(flag)
```

`p_ctf{0r1g1n4|_n@M3-0f_J4vA_Wa5_()/\|<}`