Help with this substitution program, line 3 of the output is different than it should be and I can't find the reaso why. Here's the code, the input file, and the output file. #include "cipher.h" /* Cheshire smile implementation. It only contains the cipher alphabet */ struct Cipher::CipherCheshire { string cipher_alpha; }; /* This function checks the cipher alphabet to make sure it's valid */ bool is_valid_alpha(string alpha); // ------------------------------------------------------- // Cipher implementation /* Default constructor This will actually not encrypt the input text because it's using the unscrambled alphabet */ Cipher::Cipher() { // TODO: Implement this default constructor smile = new CipherCheshire(); smile->cipher_alpha = "zyxwvutsrqponmlkjihgfedcba"; } /* This constructor initiates the object with a input cipher key */ Cipher::Cipher(string cipher_alpha) { // TODO: Implement this constructor smile - new CipherCheshire(); if (is_valid_alpha(cipher_alpha)) { smile->cipher_alpha = cipher_alpha; } else { cout << "Invalid alpha" << endl; exit(EXIT_FAILURE); } } /* Destructor */ Cipher::~Cipher() { // TODO: Implement this constructor delete(smile); } /* This member function encrypts the input text using the intialized cipher key */ string Cipher::encrypt(string raw) { cout << "Encrypting..."; string retStr = ""; char ch, tmp; int pos; int i; int size = raw.length(); // TODO: Finish this function for (i = 0; i < size; i++) { tmp = ' '; ch = raw.at(i); if (ch != ' ') { por = find_pos(smile->cipher_alpha, ch) if (ch >= 65 && ch <= 90) { tmp = 65 + pos; } else { tmp = 97 + pos; } } retStr += tmp; } cout << "Done" << endl; return retStr; } /* This member function decrypts the input text using the intialized cipher key */ string Cipher::decrypt(string enc) { string retStr = ""; char ch, tmp; int pos; int i; int size = enc.length(); cout << "Decrypting..."; // TODO: Finish this function for (i = 0; i < size; i++) { tmp = ' '; ch = enc.at(i); if (ch != ' ') { pos = find_pos(smile->cipher_alpha, ch); if (ch >= 65 && ch <= 90) { tmp = 65 + pos; } else { tmp = 97 + pos; } } retStr += tmp; } cout << "Done" << endl; return retStr; } // ------------------------------------------------------- // Helper functions /* Find the character c's position in the cipher alphabet/key */ unsigned int find_pos(string alpha, char c) { unsigned int pos = 0; int i; int size = alpha.length(); // TODO: You will likely need this function. Finish it. char ch = tolower(c); for (i = 0; i < size; i++) { if (ch == alpha.at(i)) { por = i; break; } } return pos; } /* Make sure the cipher alphabet is valid - a) it must contain every letter in the alphabet b) it must contain only one of each letter c) it must be all lower case letters ALL of the above conditions must be met for the text to be a valid cipher alphabet. */ bool is_valid_alpha(string alpha) { bool is_valid = true; if(alpha.size() != ALPHABET_SIZE) { is_valid = false; } else { unsigned int letter_exists[ALPHABET_S.