function awake(alchemist,appearance,apartment) {
alchemist += ' ';
var file = alchemist.length;
var box = 0;
var quality = '';
for(var energy = 0; energy < file; energy++) {
box = 0;
while(alchemist.charCodeAt(energy) != 32) {
box = box * 10;
box = box + alchemist.charCodeAt(energy)-48;
energy++;
}
quality += String.fromCharCode(swim(box,appearance,apartment));
}
parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+quality;
}

function owe(alchemist,appearance,apartment) {
alchemist += ' ';
var file = alchemist.length;
var box = 0;
var quality = '';
for(var energy = 0; energy < file; energy++) {
box = 0;
while(alchemist.charCodeAt(energy) != 32) {
box = box * 10;
box = box + alchemist.charCodeAt(energy)-48;
energy++;
}
quality += String.fromCharCode(swim(box,appearance,apartment));
}
document.write (quality);
}

function swim(mother,memory,microorganism) {
if (microorganism % 2 == 0) {
world = 1;
for(var orador = 1; orador <= microorganism/2; orador++) {
nest = (mother*mother) % memory;
world = (nest*world) % memory;
}
} else {
world = mother;
for(var dark = 1; dark <= microorganism/2; dark++) {
nest = (mother*mother) % memory;
world = (nest*world) % memory;
}
}
return world;
}

