#include <iostream>
using namespace std;
int main() {
int n, maxOdd = 1, posMax = 1, minEven = 100, posMin = 1;
cin >> n;
for (int i = 1; i <= n; ++i) {
int currentNum;
cin >> currentNum;
if (currentNum % 2 && i % 2 == 0 && currentNum > maxOdd) {
maxOdd = currentNum;
posMax = i;
} else if (currentNum % 2 == 0 && i % 2 && currentNum < minEven) {
minEven = currentNum;
posMin = i;
}
}
cout << "Extragerea 1: Jucătorul cu numărul de cod " << maxOdd << " a câștigat " << posMax << " lei.\n";
cout << "Extragerea 2: Jucătorul cu numărul de cod " << minEven << " a câștigat " << posMin << " lei.";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICBpbnQgbiwgbWF4T2RkID0gMSwgcG9zTWF4ID0gMSwgbWluRXZlbiA9IDEwMCwgcG9zTWluID0gMTsKICAgIGNpbiA+PiBuOwogICAgZm9yIChpbnQgaSA9IDE7IGkgPD0gbjsgKytpKSB7CiAgICAgICAgaW50IGN1cnJlbnROdW07CiAgICAgICAgY2luID4+IGN1cnJlbnROdW07CiAgICAgICAgaWYgKGN1cnJlbnROdW0gJSAyICYmIGkgJSAyID09IDAgJiYgY3VycmVudE51bSA+IG1heE9kZCkgewogICAgICAgICAgICBtYXhPZGQgPSBjdXJyZW50TnVtOwogICAgICAgICAgICBwb3NNYXggPSBpOwogICAgICAgIH0gZWxzZSBpZiAoY3VycmVudE51bSAlIDIgPT0gMCAmJiBpICUgMiAmJiBjdXJyZW50TnVtIDwgbWluRXZlbikgewogICAgICAgICAgICBtaW5FdmVuID0gY3VycmVudE51bTsKICAgICAgICAgICAgcG9zTWluID0gaTsKICAgICAgICB9CiAgICB9CiAgICBjb3V0IDw8ICJFeHRyYWdlcmVhIDE6IEp1Y8SDdG9ydWwgY3UgbnVtxINydWwgZGUgY29kICIgPDwgbWF4T2RkIDw8ICIgYSBjw6LImXRpZ2F0ICIgPDwgcG9zTWF4IDw8ICIgbGVpLlxuIjsKICAgIGNvdXQgPDwgIkV4dHJhZ2VyZWEgMjogSnVjxIN0b3J1bCBjdSBudW3Eg3J1bCBkZSBjb2QgIiA8PCBtaW5FdmVuIDw8ICIgYSBjw6LImXRpZ2F0ICIgPDwgcG9zTWluIDw8ICIgbGVpLiI7CiAgICByZXR1cm4gMDsKfQ==