You just need to fix your 'for' loop condition
use for (int j = 0; j < 26; j++)
for (int j = 0; j < 26; j++)
instead for (int j = 0; j < 25; j++)
for (int j = 0; j < 25; j++)
your code is incorrect because it doesn't check 'z' letter