// Arup Guha
// 8/31/2022
// CIS 3362 Class Example doing Vigenere Encryption

import java.util.*;

public class vig {

	public static void main(String[] args) {
	
		// Get plaintext.
		Scanner stdin = new Scanner(System.in);
		System.out.println("Enter your plaintext lowercase letters only.");
		String plain = stdin.next().toLowerCase();
		
		// Ask the user for the key.
		System.out.println("Enter the keyword for the Vigenere Cipher.");
		String key = stdin.next().toLowerCase();
			
			
		// We have to add the numeric values, mod by 26, then convert back to a char.
		for (int i=0; i<plain.length(); i++)
			System.out.print( (char)((plain.charAt(i)-'a'+key.charAt(i%key.length())-'a')%26 + 'a'));
		System.out.println();
	}
}