#include "Lexer.h"
#include <iostream>

int main() {
    Lexer lex(std::cin);
    try {
        while (true) {
            Lexer::Token tok = lex.nextToken();
            switch (tok.type) {
                case Lexer::KEYBOARD_CAP:
                    std::cout << "Leopard";
                    break;
                case Lexer::KEYBOARD:
                    std::cout << "leopard";
                    break;
                case Lexer::OTHER:
                    std::cout << tok.content;
                    break;
                case Lexer::nonmatching: case Lexer::ignore:
                    std::cout << "Impossible" << std::endl;
                    break; //These can never occur, just to satisfy the compiler...
            }
        }
    }
    catch (Lexer::NoMatch& err) {
        std::cout << "Impossible" << std::endl;
    }
    catch (Lexer::NoMoreTokens& err) {
    }
}
