Well... my program ran only the first and second cases correctly... The case 3 is a little confusing... The letter 'Y' maps to 'A' and I don't know why. Look at my table for case 3:
Frequencies in KNOWN text: a = 1 b = 1 c = 1 d = 2 e = 4 f = 1 g = 1 h = 2 i = 1 j = 1 k = 1 l = 1 m = 1 n = 1 o = 4 ...