int m = 2; int v = "ANN".hashCode() % 3000; int q = "API".hashCode() % 3000; for (int f = 0; f <= q; f++) m = (m ^ f) % v; return m;