CSES - E4590 2020 1 - Password cracking
  • Time limit: 1.00 s
  • Memory limit: 512 MB

You successfully hacked Viljami's web service and extracted the hashed passwords, but you still have to decrypt them!

While hacking the service, you were able to read its source code. Instead of using proper cryptographic hashing algorithms, Viljami hashed the passwords with a home-made hash function. First he created the following shuffle hash, which permutes the characters of the string and is fairly hard to reverse:

std::string shuffle_hash(std::string s) {
	std::string hashed = s;
	int n = (int)s.length();

	for (int i = 0; i < n; i++) {
		std::swap(hashed[i], hashed[(i + s[i]) % n]);
	}

	return hashed;
}

However, Viljami is quite paranoid, and he thought that the shuffle hash wasn't secure enough. He came up with a new algorithm called Viljamicrypt, which hashes the password in four parts using the shuffle hash. More hashing means better security, right?

std::string viljamicrypt(std::string s) {
	std::string hashed = "";

	for (int i = 0; i < 4; ++i) {
		hashed += shuffle_hash(s.substr(4*i, 4));
	}

	return hashed;
}

You need to create a program that can efficiently decrypt a password hashed with Viljamicrypt. Due to a strict password policy, all passwords in the service are known to be exactly 16 characters long.

Input

On the only line of the input there is a single string s: a password hashed with Viljamicrypt. The string is 16 characters long and consists of characters a-z.

Output

Output a single string: the decrypted password.

If there are multiple passwords that are equal to s when hashed with Viljamicrypt, you may output any of them.

Example

Input:

bcdafghejklinopm

Output:

abcdefghijklmnop

Note: You can check whether an output is valid by hashing it with Viljamicrypt and comparing it with the input.