###########################################################
#
# Calculate the four square roots of ctp mod N via CRT.
# If any ends with '\xff\xff', delete the padding and print.
#
sgns = [[1,1],[-1,-1],[1,-1],[-1,1]]
for i in range(4):
rawdecode = num2str((sgns[i][0]*s*p*cq + sgns[i][1]*t*q*cp)%N)
if rawdecode.endswith('\xff\xff'):
print rawdecode[0:len(rawdecode)-2]