dict = {} dict['a'] = 3 dict['b'] = 5 dict['c'] = 7 dict['d'] = 71 dict['e'] = 315551 dict['f'] = 3253031 dict['g'] = 13 dict['h'] = 139 dict['i'] = 341623 dict['j'] = 611011 dict['k'] = 17 dict['l'] = 331 dict['m'] = 7159 dict['n'] = 773 dict['o'] = 179 dict['p'] = 23 dict['q'] = 31 dict['r'] = 277 dict['s'] = 1019 dict['t'] = 107 dict['u'] = 25919 dict['v'] = 40241 dict['w'] = 269 dict['x'] = 617 dict['y'] = 16273 dict['z'] = 111 v = dict.values() vc = (2<<31) vl = len(dict) vr = xrange(vl) for x0 in vr: for x1 in vr: vt = ((v[x0]*v[x1]) % vc) if (vt == 1337) or (vt == 0xFFFFFFFF): print (x0, x1, v[x0], v[x1], vt)