// This file is part of hnefatafl-copenhagen.
//
// hnefatafl-copenhagen is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// hnefatafl-copenhagen is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

//! Icelandic Runic created by Alexander R. (<https://www.omniglot.com/conscripts/icelandicrunic.htm>)

#![deny(clippy::expect_used)]
#![deny(clippy::indexing_slicing)]
#![deny(clippy::panic)]
#![deny(clippy::unwrap_used)]

use std::io;

fn main() {
    loop {
        let mut input = String::new();
        let mut output = String::new();

        match io::stdin().read_line(&mut input) {
            Ok(_characters_read) => {
                for c in input.chars() {
                    output.push(translate_to_runic(c));
                }
            }
            Err(error) => println!("error: {error}"),
        }

        print!("{output}");
    }
}

fn translate_to_runic(c: char) -> char {
    match c {
        'A' | 'a' => '',
        'Á' | 'á' => '',
        'B' | 'b' => '',
        'D' | 'd' => '',
        'Ð' | 'ð' => '',
        'E' | 'e' => '',
        'É' | 'é' => '',
        'F' | 'f' => '',
        'G' | 'g' => '',
        'H' | 'h' => '',
        'I' | 'i' => '',
        'Í' | 'í' => '',
        'J' | 'j' => '',
        'K' | 'k' => '',
        'L' | 'l' => '',
        'M' | 'm' => '',
        'N' | 'n' => '',
        'O' | 'o' => '',
        'Ó' | 'ó' => '',
        'P' | 'p' => '',
        'R' | 'r' => '',
        'S' | 's' => '',
        'T' | 't' => '',
        'U' | 'u' => '',
        'Ú' | 'ú' => '',
        'V' | 'v' => '',
        'X' | 'x' => '',
        'Y' | 'y' => '',
        'Ý' | 'ý' => '',
        'Þ' | 'þ' => '',
        'Æ' | 'æ' => '',
        'Ö' | 'ö' => '',
        ch => ch,
    }
}