QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#541307#8937. Stage: Agausscrabucup-team296#AC ✓1ms2372kbRust13.2kb2024-08-31 19:07:272024-08-31 19:07:28

Judging History

你现在查看的是最新测评结果

  • [2024-08-31 19:07:28]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:2372kb
  • [2024-08-31 19:07:27]
  • 提交

answer

// 
pub mod solution {
//{"name":"f","group":"Manual","url":"","interactive":false,"timeLimit":2000,"tests":[{"input":"","output":""},{"input":"","output":""}],"testType":"single","input":{"type":"stdin","fileName":null,"pattern":null},"output":{"type":"stdout","fileName":null,"pattern":null},"languages":{"java":{"taskClass":"f"}}}

#[allow(unused)]
use crate::dbg;
use crate::algo_lib::io::input::Input;
use crate::algo_lib::io::output::Output;

fn solve(input: &mut Input, out: &mut Output, _test_case: usize) {
    let n = input.usize();
    let mut s: Vec<Vec<u8>> = vec![];
    let mut cnt = vec![];
    for i in 0..n {
        s.push(input.string());
        cnt.push(input.i32());
    }
    let mut res = vec![];
    for i in 0..n {
        let mut rank = 1;
        for j in 0..n {
            if j != i && cnt[j] > cnt[i] {
                rank += 1;
            }
        }
        if rank > s[i].len() {
            rank = s[i].len();
        }
        res.extend(s[i][..s[i].len() - rank].to_vec());
    }
    if res.len() != 0 {
        res[0] = res[0].to_ascii_uppercase();
    }
    let res_str = String::from_utf8(res).unwrap();
    out.print(format!("Stage: {res_str}"));
}

pub(crate) fn run(mut input: Input, mut output: Output) -> bool {
    solve(&mut input, &mut output, 1);
    output.flush();
    true
}

}
pub mod algo_lib {
pub mod io {
pub mod input {
use std::fmt::Debug;
use std::io::Read;
use std::marker::PhantomData;
use std::path::Path;
use std::str::FromStr;

pub struct Input {
    input: Box<dyn Read>,
    buf: Vec<u8>,
    at: usize,
    buf_read: usize,
}

macro_rules! read_integer_fun {
    ($t:ident) => {
        #[allow(unused)]
        pub fn $t(&mut self) -> $t {
            self.read_integer()
        }
    };
}

impl Input {
    const DEFAULT_BUF_SIZE: usize = 4096;

    ///
    /// Using with stdin:
    /// ```no_run
    /// use algo_lib::io::input::Input;
    /// let stdin = std::io::stdin();
    /// let input = Input::new(Box::new(stdin));
    /// ```
    ///
    /// For read files use ``new_file`` instead.
    ///
    ///
    pub fn new(input: Box<dyn Read>) -> Self {
        Self {
            input,
            buf: vec![0; Self::DEFAULT_BUF_SIZE],
            at: 0,
            buf_read: 0,
        }
    }

    pub fn new_stdin() -> Self {
        let stdin = std::io::stdin();
        Self::new(Box::new(stdin))
    }

    pub fn new_file<P: AsRef<Path>>(path: P) -> Self {
        let file = std::fs::File::open(&path)
            .unwrap_or_else(|_| panic!("Can't open file: {:?}", path.as_ref().as_os_str()));
        Self::new(Box::new(file))
    }

    pub fn new_with_size(input: Box<dyn Read>, buf_size: usize) -> Self {
        Self {
            input,
            buf: vec![0; buf_size],
            at: 0,
            buf_read: 0,
        }
    }

    pub fn new_file_with_size<P: AsRef<Path>>(path: P, buf_size: usize) -> Self {
        let file = std::fs::File::open(&path)
            .unwrap_or_else(|_| panic!("Can't open file: {:?}", path.as_ref().as_os_str()));
        Self::new_with_size(Box::new(file), buf_size)
    }

    pub fn get(&mut self) -> Option<u8> {
        if self.refill_buffer() {
            let res = self.buf[self.at];
            self.at += 1;
            Some(res)
        } else {
            None
        }
    }

    pub fn peek(&mut self) -> Option<u8> {
        if self.refill_buffer() {
            Some(self.buf[self.at])
        } else {
            None
        }
    }

    pub fn skip_whitespace(&mut self) {
        while let Some(b) = self.peek() {
            if !char::from(b).is_whitespace() {
                return;
            }
            self.get();
        }
    }

    pub fn next_token(&mut self) -> Option<Vec<u8>> {
        self.skip_whitespace();
        let mut res = Vec::new();
        while let Some(c) = self.get() {
            if char::from(c).is_whitespace() {
                break;
            }
            res.push(c);
        }
        if res.is_empty() {
            None
        } else {
            Some(res)
        }
    }

    //noinspection RsSelfConvention
    pub fn is_exhausted(&mut self) -> bool {
        self.peek().is_none()
    }

    pub fn has_more_elements(&mut self) -> bool {
        !self.is_exhausted()
    }

    pub fn read<T: Readable>(&mut self) -> T {
        T::read(self)
    }

    pub fn vec<T: Readable>(&mut self, size: usize) -> Vec<T> {
        let mut res = Vec::with_capacity(size);
        for _ in 0usize..size {
            res.push(self.read());
        }
        res
    }

    pub fn string_vec(&mut self, size: usize) -> Vec<Vec<u8>> {
        let mut res = Vec::with_capacity(size);
        for _ in 0usize..size {
            res.push(self.string());
        }
        res
    }

    pub fn read_line(&mut self) -> String {
        let mut res = String::new();
        while let Some(c) = self.get() {
            if c == b'\n' {
                break;
            }
            if c == b'\r' {
                if self.peek() == Some(b'\n') {
                    self.get();
                }
                break;
            }
            res.push(c.into());
        }
        res
    }

    #[allow(clippy::should_implement_trait)]
    pub fn into_iter<T: Readable>(self) -> InputIterator<T> {
        InputIterator {
            input: self,
            phantom: Default::default(),
        }
    }

    fn read_integer<T: FromStr + Debug>(&mut self) -> T
    where
        <T as FromStr>::Err: Debug,
    {
        let res = self.read_string();
        res.parse::<T>().unwrap()
    }

    fn read_string(&mut self) -> String {
        match self.next_token() {
            None => {
                panic!("Input exhausted");
            }
            Some(res) => unsafe { String::from_utf8_unchecked(res) },
        }
    }

    pub fn string_as_string(&mut self) -> String {
        self.read_string()
    }

    pub fn string(&mut self) -> Vec<u8> {
        self.read_string().into_bytes()
    }

    fn read_char(&mut self) -> char {
        self.skip_whitespace();
        self.get().unwrap().into()
    }

    fn read_float(&mut self) -> f64 {
        self.read_string().parse().unwrap()
    }

    pub fn f64(&mut self) -> f64 {
        self.read_float()
    }

    fn refill_buffer(&mut self) -> bool {
        if self.at == self.buf_read {
            self.at = 0;
            self.buf_read = self.input.read(&mut self.buf).unwrap();
            self.buf_read != 0
        } else {
            true
        }
    }

    read_integer_fun!(i32);
    read_integer_fun!(i64);
    read_integer_fun!(i128);
    read_integer_fun!(u32);
    read_integer_fun!(u64);
    read_integer_fun!(usize);
}

pub trait Readable {
    fn read(input: &mut Input) -> Self;
}

impl Readable for String {
    fn read(input: &mut Input) -> Self {
        input.read_string()
    }
}

impl Readable for char {
    fn read(input: &mut Input) -> Self {
        input.read_char()
    }
}

impl Readable for f64 {
    fn read(input: &mut Input) -> Self {
        input.read_string().parse().unwrap()
    }
}

impl Readable for f32 {
    fn read(input: &mut Input) -> Self {
        input.read_string().parse().unwrap()
    }
}

impl<T: Readable> Readable for Vec<T> {
    fn read(input: &mut Input) -> Self {
        let size = input.read();
        input.vec(size)
    }
}

pub struct InputIterator<T: Readable> {
    input: Input,
    phantom: PhantomData<T>,
}

impl<T: Readable> Iterator for InputIterator<T> {
    type Item = T;

    fn next(&mut self) -> Option<Self::Item> {
        self.input.skip_whitespace();
        self.input.peek().map(|_| self.input.read())
    }
}

macro_rules! read_integer {
    ($t:ident) => {
        impl Readable for $t {
            fn read(input: &mut Input) -> Self {
                input.read_integer()
            }
        }
    };
}

read_integer!(i8);
read_integer!(i16);
read_integer!(i32);
read_integer!(i64);
read_integer!(i128);
read_integer!(isize);
read_integer!(u8);
read_integer!(u16);
read_integer!(u32);
read_integer!(u64);
read_integer!(u128);
read_integer!(usize);
}
pub mod output {
use std::io::Write;

pub struct Output {
    output: Box<dyn Write>,
    buf: Vec<u8>,
    at: usize,
    auto_flush: bool,
}

impl Output {
    const DEFAULT_BUF_SIZE: usize = 4096;

    pub fn new(output: Box<dyn Write>) -> Self {
        Self {
            output,
            buf: vec![0; Self::DEFAULT_BUF_SIZE],
            at: 0,
            auto_flush: false,
        }
    }

    pub fn new_stdout() -> Self {
        let stdout = std::io::stdout();
        Self::new(Box::new(stdout))
    }

    pub fn new_file(path: impl AsRef<std::path::Path>) -> Self {
        let file = std::fs::File::create(path).unwrap();
        Self::new(Box::new(file))
    }

    pub fn new_with_auto_flush(output: Box<dyn Write>) -> Self {
        Self {
            output,
            buf: vec![0; Self::DEFAULT_BUF_SIZE],
            at: 0,
            auto_flush: true,
        }
    }

    pub fn flush(&mut self) {
        if self.at != 0 {
            self.output.write_all(&self.buf[..self.at]).unwrap();
            self.at = 0;
            self.output.flush().expect("Couldn't flush output");
        }
    }

    pub fn print<T: Writable>(&mut self, s: T) {
        s.write(self);
    }

    pub fn println<T: Writable>(&mut self, s: T) {
        s.write(self);
        self.put(b'\n');
    }

    pub fn put(&mut self, b: u8) {
        self.buf[self.at] = b;
        self.at += 1;
        if self.at == self.buf.len() {
            self.flush();
        }
    }

    pub fn maybe_flush(&mut self) {
        if self.auto_flush {
            self.flush();
        }
    }

    pub fn print_per_line<T: Writable>(&mut self, arg: &[T]) {
        for i in arg {
            i.write(self);
            self.put(b'\n');
        }
    }

    pub fn print_iter<T: Writable, I: Iterator<Item = T>>(&mut self, iter: I) {
        let mut first = true;
        for e in iter {
            if first {
                first = false;
            } else {
                self.put(b' ');
            }
            e.write(self);
        }
    }

    pub fn print_iter_ref<'a, T: 'a + Writable, I: Iterator<Item = &'a T>>(&mut self, iter: I) {
        let mut first = true;
        for e in iter {
            if first {
                first = false;
            } else {
                self.put(b' ');
            }
            e.write(self);
        }
    }
}

impl Write for Output {
    fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
        let mut start = 0usize;
        let mut rem = buf.len();
        while rem > 0 {
            let len = (self.buf.len() - self.at).min(rem);
            self.buf[self.at..self.at + len].copy_from_slice(&buf[start..start + len]);
            self.at += len;
            if self.at == self.buf.len() {
                self.flush();
            }
            start += len;
            rem -= len;
        }
        if self.auto_flush {
            self.flush();
        }
        Ok(buf.len())
    }

    fn flush(&mut self) -> std::io::Result<()> {
        self.flush();
        Ok(())
    }
}

pub trait Writable {
    fn write(&self, output: &mut Output);
}

impl Writable for &str {
    fn write(&self, output: &mut Output) {
        output.write_all(self.as_bytes()).unwrap();
    }
}

impl Writable for String {
    fn write(&self, output: &mut Output) {
        output.write_all(self.as_bytes()).unwrap();
    }
}

impl Writable for char {
    fn write(&self, output: &mut Output) {
        output.put(*self as u8);
    }
}

impl<T: Writable> Writable for [T] {
    fn write(&self, output: &mut Output) {
        output.print_iter_ref(self.iter());
    }
}

impl<T: Writable> Writable for Vec<T> {
    fn write(&self, output: &mut Output) {
        self[..].write(output);
    }
}

macro_rules! write_to_string {
    ($t:ident) => {
        impl Writable for $t {
            fn write(&self, output: &mut Output) {
                self.to_string().write(output);
            }
        }
    };
}

write_to_string!(u8);
write_to_string!(u16);
write_to_string!(u32);
write_to_string!(u64);
write_to_string!(u128);
write_to_string!(usize);
write_to_string!(i8);
write_to_string!(i16);
write_to_string!(i32);
write_to_string!(i64);
write_to_string!(i128);
write_to_string!(isize);
write_to_string!(f32);
write_to_string!(f64);

impl<T: Writable, U: Writable> Writable for (T, U) {
    fn write(&self, output: &mut Output) {
        self.0.write(output);
        output.put(b' ');
        self.1.write(output);
    }
}

impl<T: Writable, U: Writable, V: Writable> Writable for (T, U, V) {
    fn write(&self, output: &mut Output) {
        self.0.write(output);
        output.put(b' ');
        self.1.write(output);
        output.put(b' ');
        self.2.write(output);
    }
}
}
}
pub mod misc {
pub mod dbg_macro {
#[macro_export]
#[allow(unused_macros)]
macro_rules! dbg {
    ($first_val:expr, $($val:expr),+ $(,)?) => {
        eprint!("[{}:{}] {} = {:?}",
                    file!(), line!(), stringify!($first_val), &$first_val);
        ($(eprint!(", {} = {:?}", stringify!($val), &$val)),+,);
        eprintln!();
    };
    ($first_val:expr) => {
        eprintln!("[{}:{}] {} = {:?}",
                    file!(), line!(), stringify!($first_val), &$first_val)
    };
}
}
}
}
fn main() {
    let input = algo_lib::io::input::Input::new_stdin();
    let mut output = algo_lib::io::output::Output::new_stdout();
    crate::solution::run(input, output);
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 2160kb

input:

4
arcos 2
gausr 5
scrail 3
bei 3

output:

Stage: Agausscrab

result:

ok single line: 'Stage: Agausscrab'

Test #2:

score: 0
Accepted
time: 0ms
memory: 2112kb

input:

4
zhe 1
jiang 3
sheng 5
sai 2

output:

Stage: Jiashen

result:

ok single line: 'Stage: Jiashen'

Test #3:

score: 0
Accepted
time: 0ms
memory: 2228kb

input:

1
yp 1

output:

Stage: Y

result:

ok single line: 'Stage: Y'

Test #4:

score: 0
Accepted
time: 0ms
memory: 2168kb

input:

2
ut 1
fg 1

output:

Stage: Uf

result:

ok single line: 'Stage: Uf'

Test #5:

score: 0
Accepted
time: 0ms
memory: 2136kb

input:

8
pz 1
ym 1
hi 1
mv 1
jh 1
jd 1
ok 1
lc 1

output:

Stage: Pyhmjjol

result:

ok single line: 'Stage: Pyhmjjol'

Test #6:

score: 0
Accepted
time: 0ms
memory: 2064kb

input:

8
cm 2
uk 2
ls 2
ay 1
vr 2
zt 1
al 2
ze 2

output:

Stage: Culvaz

result:

ok single line: 'Stage: Culvaz'

Test #7:

score: 0
Accepted
time: 0ms
memory: 2268kb

input:

8
si 2
vh 2
pb 3
fb 3
uy 1
pa 1
rm 2
no 2

output:

Stage: Pf

result:

ok single line: 'Stage: Pf'

Test #8:

score: 0
Accepted
time: 0ms
memory: 2108kb

input:

8
vs 4
aa 4
tx 1
oe 1
ge 2
il 4
zj 2
cy 1

output:

Stage: Vai

result:

ok single line: 'Stage: Vai'

Test #9:

score: 0
Accepted
time: 0ms
memory: 2068kb

input:

8
hj 5
xu 5
yg 4
tp 3
eo 3
gt 4
hk 2
ua 3

output:

Stage: Hx

result:

ok single line: 'Stage: Hx'

Test #10:

score: 0
Accepted
time: 0ms
memory: 2228kb

input:

8
vh 1
kfa 1
dlq 1
zf 1
qkt 1
ako 1
rds 1
wus 1

output:

Stage: Vkfdlzqkakrdwu

result:

ok single line: 'Stage: Vkfdlzqkakrdwu'

Test #11:

score: 0
Accepted
time: 0ms
memory: 2144kb

input:

8
my 1
hgw 2
nrc 2
gux 2
bjp 1
wme 2
frt 1
ci 1

output:

Stage: Hgnrguwm

result:

ok single line: 'Stage: Hgnrguwm'

Test #12:

score: 0
Accepted
time: 0ms
memory: 2168kb

input:

8
ci 3
ms 1
vw 3
ca 3
nn 3
de 1
fn 1
uq 2

output:

Stage: Cvcn

result:

ok single line: 'Stage: Cvcn'

Test #13:

score: 0
Accepted
time: 0ms
memory: 2104kb

input:

8
oa 4
rt 3
ak 1
hh 3
ita 3
ltp 4
wy 3
tt 3

output:

Stage: Olt

result:

ok single line: 'Stage: Olt'

Test #14:

score: 0
Accepted
time: 0ms
memory: 2256kb

input:

8
nv 1
ki 3
ete 1
gtv 4
dvm 5
kd 5
gay 2
bx 5

output:

Stage: Dvkb

result:

ok single line: 'Stage: Dvkb'

Test #15:

score: 0
Accepted
time: 0ms
memory: 2336kb

input:

8
bpas 1
jfx 1
fpq 1
eiq 1
lj 1
pn 1
bo 1
nj 1

output:

Stage: Bpajffpeilpbn

result:

ok single line: 'Stage: Bpajffpeilpbn'

Test #16:

score: 0
Accepted
time: 0ms
memory: 2144kb

input:

8
rh 1
ur 2
fmf 2
xner 1
dyte 2
qquq 2
mcw 2
kj 1

output:

Stage: Ufmdytqqumc

result:

ok single line: 'Stage: Ufmdytqqumc'

Test #17:

score: 0
Accepted
time: 0ms
memory: 2280kb

input:

8
iqmf 1
jug 3
vheq 2
qol 2
nq 1
fm 2
zh 2
zb 3

output:

Stage: Juvz

result:

ok single line: 'Stage: Juvz'

Test #18:

score: 0
Accepted
time: 0ms
memory: 2196kb

input:

8
um 4
zejz 3
rdi 2
lbai 3
pip 2
yqst 4
xjd 4
gvhu 2

output:

Stage: Uyqsxj

result:

ok single line: 'Stage: Uyqsxj'

Test #19:

score: 0
Accepted
time: 0ms
memory: 2228kb

input:

8
owf 5
bj 2
owm 2
erz 5
wxt 2
zuf 2
zbd 5
lh 3

output:

Stage: Owerzb

result:

ok single line: 'Stage: Owerzb'

Test #20:

score: 0
Accepted
time: 0ms
memory: 2160kb

input:

8
zxp 1
nlid 1
iqqo 1
ly 1
luvc 1
eiub 1
wqzwg 1
zgd 1

output:

Stage: Zxnliiqqlluveiuwqzwzg

result:

ok single line: 'Stage: Zxnliiqqlluveiuwqzwzg'

Test #21:

score: 0
Accepted
time: 0ms
memory: 2224kb

input:

8
bhw 1
khsm 2
uvtv 1
zbae 2
qk 2
weeoj 2
chbrr 1
xj 1

output:

Stage: Khszbaqweeo

result:

ok single line: 'Stage: Khszbaqweeo'

Test #22:

score: 0
Accepted
time: 0ms
memory: 2264kb

input:

8
ndi 3
zlxmi 3
ewcl 1
srcal 2
egfp 3
acog 1
zrvq 3
af 1

output:

Stage: Ndzlxmegfzrv

result:

ok single line: 'Stage: Ndzlxmegfzrv'

Test #23:

score: 0
Accepted
time: 0ms
memory: 2144kb

input:

8
euq 1
al 4
sj 1
hbv 4
ihr 4
yebj 4
nvrmw 3
towa 1

output:

Stage: Ahbihyeb

result:

ok single line: 'Stage: Ahbihyeb'

Test #24:

score: 0
Accepted
time: 0ms
memory: 2232kb

input:

8
uep 4
mlq 2
pbtci 4
vlc 4
px 2
ctrx 5
afsg 4
bj 2

output:

Stage: Upbtvctraf

result:

ok single line: 'Stage: Upbtvctraf'

Test #25:

score: 0
Accepted
time: 0ms
memory: 2348kb

input:

32
fr 1
ay 1
wc 1
ls 1
kp 1
rw 1
lh 1
kj 1
ku 1
oe 1
lh 1
ea 1
py 1
al 1
zj 1
ee 1
gw 1
if 1
sy 1
kz 1
in 1
vl 1
ds 1
la 1
qi 1
ut 1
ub 1
zq 1
bi 1
mu 1
ia 1
kv 1

output:

Stage: Fawlkrlkkolepazegiskivdlquuzbmik

result:

ok single line: 'Stage: Fawlkrlkkolepazegiskivdlquuzbmik'

Test #26:

score: 0
Accepted
time: 0ms
memory: 2148kb

input:

32
vb 2
fa 1
aq 1
mz 1
tz 1
he 2
be 1
yt 1
cc 2
xu 2
qy 1
wa 1
eg 1
qd 2
kg 2
tf 2
tb 1
im 2
ap 1
re 2
qz 2
fl 2
cq 1
yt 2
nc 1
sj 1
ac 1
dd 2
hk 2
rq 1
ne 2
hv 2

output:

Stage: Vhcxqktirqfydhnh

result:

ok single line: 'Stage: Vhcxqktirqfydhnh'

Test #27:

score: 0
Accepted
time: 0ms
memory: 2112kb

input:

32
tw 2
yp 1
fw 1
zy 3
rf 3
xl 2
nj 3
ma 2
np 3
kc 1
uh 1
js 3
wj 1
zv 1
rs 2
uc 1
yu 2
qa 3
wl 2
tx 1
qm 3
tp 3
bw 3
pn 1
si 2
qy 1
ct 1
gv 1
oq 1
dv 2
fv 2
nn 2

output:

Stage: Zrnnjqqtb

result:

ok single line: 'Stage: Zrnnjqqtb'

Test #28:

score: 0
Accepted
time: 0ms
memory: 2148kb

input:

32
gs 3
ci 3
jn 2
bf 1
dq 3
qw 4
wk 3
bc 1
xm 4
on 1
du 2
pj 1
pv 3
pj 1
yh 2
nz 3
mv 2
cp 1
zg 4
wy 1
uo 3
ph 3
lc 2
go 3
xc 2
of 1
eb 3
jq 3
vw 2
ua 3
or 4
lk 3

output:

Stage: Qxzo

result:

ok single line: 'Stage: Qxzo'

Test #29:

score: 0
Accepted
time: 0ms
memory: 2156kb

input:

32
wc 3
dj 3
nb 1
oa 2
bw 4
gm 4
qh 2
pm 4
lz 4
xd 1
hd 1
gb 3
il 3
xb 4
fa 3
pi 5
za 4
oa 4
hf 1
dz 5
qa 4
vc 3
gi 3
xh 1
ze 3
eu 1
fs 3
qe 2
tk 2
ys 2
xn 3
fk 4

output:

Stage: Pd

result:

ok single line: 'Stage: Pd'

Test #30:

score: 0
Accepted
time: 0ms
memory: 2148kb

input:

32
kzm 1
vjv 1
aqa 1
laa 1
ba 1
dlz 1
hz 1
hhj 1
lde 1
vr 1
byb 1
jz 1
br 1
pn 1
cw 1
jkj 1
fk 1
lme 1
yp 1
et 1
xf 1
xo 1
dn 1
nx 1
ze 1
urw 1
vln 1
ju 1
kqp 1
xam 1
jw 1
kbo 1

output:

Stage: Kzvjaqlabdlhhhldvbyjbpcjkflmyexxdnzurvljkqxajkb

result:

ok single line: 'Stage: Kzvjaqlabdlhhhldvbyjbpcjkflmyexxdnzurvljkqxajkb'

Test #31:

score: 0
Accepted
time: 0ms
memory: 2168kb

input:

32
brt 2
kj 2
hky 2
eru 1
bn 1
kpm 1
in 2
nq 1
ayq 1
bs 1
vtb 2
hp 1
mgi 1
jq 1
rq 2
aj 2
zqe 2
me 1
qnx 1
gld 1
li 1
rcl 1
wuh 1
cvu 2
db 2
zaf 1
yo 1
qw 1
fh 1
au 2
er 1
tp 2

output:

Stage: Brkhkivtrazqcvdat

result:

ok single line: 'Stage: Brkhkivtrazqcvdat'

Test #32:

score: 0
Accepted
time: 0ms
memory: 2156kb

input:

32
ni 1
kin 3
vtl 2
lg 3
xrd 2
jj 3
utx 3
byy 3
kdr 2
zz 2
rb 3
rm 3
uvp 3
cnh 2
dy 1
rbm 1
zr 2
geo 2
blu 2
jxx 3
reu 3
ah 3
ov 1
el 2
ui 1
fzw 1
gt 1
kco 1
vwi 3
mm 1
vd 3
rip 3

output:

Stage: Kiljutbyrruvjxreavwvri

result:

ok single line: 'Stage: Kiljutbyrruvjxreavwvri'

Test #33:

score: 0
Accepted
time: 0ms
memory: 2204kb

input:

32
ps 3
lf 2
pa 2
cbs 1
bsm 4
de 2
krh 4
om 2
ao 4
svx 4
oe 2
ggw 1
fy 1
oj 4
im 4
dv 1
uco 2
lha 4
uq 4
gmy 1
ad 1
ebk 3
uxs 1
ayy 1
gb 1
tqh 1
hp 1
pl 1
ie 1
ee 2
ntx 1
kc 2

output:

Stage: Bskrasvoilhu

result:

ok single line: 'Stage: Bskrasvoilhu'

Test #34:

score: 0
Accepted
time: 0ms
memory: 2268kb

input:

32
gk 3
uu 2
tox 3
ezj 4
ruq 4
re 2
nrn 5
wqk 4
lea 5
hg 4
rfv 5
dh 4
vhz 1
hfu 3
vz 4
bst 4
bb 1
zb 5
bt 5
og 2
dsr 5
ba 2
xgw 3
ez 2
id 4
xr 3
bq 1
vh 3
nt 5
va 1
snw 3
dlb 1

output:

Stage: Nrlerfzbdsn

result:

ok single line: 'Stage: Nrlerfzbdsn'

Test #35:

score: 0
Accepted
time: 0ms
memory: 2224kb

input:

32
qh 1
zgtz 1
sbbs 1
chiq 1
tdyu 1
bi 1
kc 1
ivn 1
sm 1
gh 1
ps 1
vlle 1
nmk 1
zdo 1
tte 1
ja 1
nh 1
oicc 1
wvrq 1
zwh 1
rx 1
pup 1
fhzr 1
bscl 1
ksv 1
dlvv 1
sfh 1
afc 1
bcel 1
ei 1
cmv 1
vn 1

output:

Stage: Qzgtsbbchitdybkivsgpvllnmzdttjnoicwvrzwrpufhzbscksdlvsfafbceecmv

result:

ok single line: 'Stage: Qzgtsbbchitdybkivsgpvll...cwvrzwrpufhzbscksdlvsfafbceecmv'

Test #36:

score: 0
Accepted
time: 0ms
memory: 2348kb

input:

32
kzq 1
ht 1
uu 2
vhoo 1
gylk 1
vdap 2
hyd 1
rhzj 2
sxw 2
yit 1
xj 1
pfsy 2
nfn 1
ik 1
vktd 1
vpg 2
gvi 2
pzb 1
ucx 1
qtwv 1
uag 1
iujn 1
wbsh 1
bkl 2
rf 2
uq 1
or 1
mll 2
rzgv 2
mcpq 2
lqw 2
zkbp 1

output:

Stage: Uvdarhzsxpfsvpgvbkrmlrzgmcplq

result:

ok single line: 'Stage: Uvdarhzsxpfsvpgvbkrmlrzgmcplq'

Test #37:

score: 0
Accepted
time: 0ms
memory: 2112kb

input:

32
xj 2
xsx 3
qisu 1
cmyb 1
tkxf 3
fdr 2
iqi 3
swkf 2
kjpd 2
fdbk 1
twy 3
ceve 1
wzsl 3
jop 3
wf 1
qkia 1
zxdq 1
vwz 2
zol 3
ucw 2
pu 1
iuv 1
io 2
bf 2
vq 2
ip 1
qqlo 3
dynk 2
sykc 1
ifsr 3
xhe 3
nmf 3

output:

Stage: Xstkxiqtwwzsjozoqqlifsxhnm

result:

ok single line: 'Stage: Xstkxiqtwwzsjozoqqlifsxhnm'

Test #38:

score: 0
Accepted
time: 0ms
memory: 2132kb

input:

32
naxv 1
ttdz 2
db 1
yisf 4
bwnx 2
nbg 4
yrij 3
ss 2
fbkf 1
nn 2
tnl 4
chd 2
dby 2
ad 1
fb 1
wxhb 3
kds 4
jafx 2
ou 2
qutj 3
zebq 1
hx 4
wphj 3
lqfu 4
rgd 3
ldio 2
emz 4
grgy 1
mgpr 4
vll 1
lju 4
zhv 1

output:

Stage: Yisnbtnkdhlqfemmgplj

result:

ok single line: 'Stage: Yisnbtnkdhlqfemmgplj'

Test #39:

score: 0
Accepted
time: 0ms
memory: 2280kb

input:

32
iwi 2
rtzi 1
ui 2
xxov 2
dwrv 4
bcl 3
hzdu 2
jtss 3
kyzy 5
xo 2
nakc 4
wg 1
od 5
mkkk 3
azh 2
au 3
mcly 1
khl 2
oj 5
ach 4
vg 4
had 1
agoy 1
jiwb 2
on 4
eapt 1
jilb 5
jan 5
lrro 3
ppu 1
vh 1
prs 3

output:

Stage: Kyzoojilja

result:

ok single line: 'Stage: Kyzoojilja'

Test #40:

score: 0
Accepted
time: 0ms
memory: 2272kb

input:

32
aqwtm 1
cx 1
mcriw 1
lrs 1
cuc 1
hgaj 1
dqm 1
txrl 1
ayr 1
am 1
irhpx 1
gxq 1
wc 1
dvwm 1
nckcl 1
cax 1
se 1
xa 1
bhrsr 1
qaeb 1
yluyp 1
bwd 1
muoxh 1
fykm 1
gnc 1
efl 1
dkrbn 1
dnnlt 1
vfjf 1
jr 1
uu 1
frkcp 1

output:

Stage: Aqwtcmcrilrcuhgadqtxrayairhpgxwdvwnckccasxbhrsqaeyluybwmuoxfykgnefdkrbdnnlvfjjufrkc

result:

ok single line: 'Stage: Aqwtcmcrilrcuhgadqtxray...ybwmuoxfykgnefdkrbdnnlvfjjufrkc'

Test #41:

score: 0
Accepted
time: 0ms
memory: 2136kb

input:

32
mheff 1
mx 2
ulqt 1
hc 1
li 2
zx 2
mqwjy 2
vptc 2
smjw 1
zaofz 2
xojl 2
efpf 2
th 2
az 2
tu 1
nl 2
osx 1
rkkm 1
ztc 2
bp 2
nun 1
auo 1
rry 2
cuzdj 1
mad 2
jd 2
elroq 1
ei 1
gkurv 2
qlrzw 1
ldajd 1
kes 1

output:

Stage: Mlzmqwjvptzaofxojefptanztbrrmajgkur

result:

ok single line: 'Stage: Mlzmqwjvptzaofxojefptanztbrrmajgkur'

Test #42:

score: 0
Accepted
time: 0ms
memory: 2164kb

input:

32
drmck 3
rb 2
hrxa 3
njcg 2
stbep 1
hn 2
torbf 1
zcda 3
rohu 3
bmq 1
movf 3
ts 1
pu 1
dzgnb 1
tt 1
xy 1
pue 3
jjyhe 3
sn 2
va 1
ohhgi 1
qua 2
wi 3
etiqr 1
jpy 1
cyd 1
rtwb 2
ldhxb 3
gl 1
mail 3
ldqp 3
bgyjg 3

output:

Stage: Drmchrxzcdrohmovpujjyhwldhxmaildqbgyj

result:

ok single line: 'Stage: Drmchrxzcdrohmovpujjyhwldhxmaildqbgyj'

Test #43:

score: 0
Accepted
time: 0ms
memory: 2076kb

input:

32
tnxso 3
xg 1
pash 2
xa 4
annjc 4
uc 2
hmfh 3
gl 1
by 1
onhpa 3
pnj 3
aas 3
sg 4
tx 1
wd 3
le 1
ex 3
su 1
zagno 1
wd 2
qtl 4
ryiaj 2
nwscp 2
cobr 2
hzi 1
ufb 2
oyff 2
qbqlr 1
ejli 2
xj 2
qca 2
rkqmf 2

output:

Stage: Xannjsqt

result:

ok single line: 'Stage: Xannjsqt'

Test #44:

score: 0
Accepted
time: 0ms
memory: 2228kb

input:

32
jwbip 4
gk 3
xfd 1
qdzbp 4
mrzm 3
mgns 2
tnglq 3
hkx 4
vzjk 4
dnum 2
tpdk 2
ypk 2
zbh 1
xlhy 5
cofi 1
jvmy 1
dus 1
wcjum 3
zn 5
yu 2
qsv 2
vhj 5
rxavl 2
xof 4
auem 5
jwmk 2
ctk 2
iplq 4
etaa 3
kpop 5
xxvn 5
kjt 4

output:

Stage: Xlhzvhauekpoxxv

result:

ok single line: 'Stage: Xlhzvhauekpoxxv'

Test #45:

score: 0
Accepted
time: 0ms
memory: 2240kb

input:

128
lx 1
kd 1
hf 1
qf 1
lv 1
yu 1
xi 1
gt 1
bt 1
pr 1
ab 1
oc 1
jv 1
vv 1
gy 1
gd 1
cn 1
zu 1
qp 1
tg 1
uh 1
tn 1
bw 1
lm 1
ls 1
bg 1
wr 1
fm 1
ot 1
gw 1
zj 1
xg 1
bh 1
eo 1
mf 1
td 1
mm 1
lc 1
ze 1
qx 1
az 1
up 1
cs 1
qt 1
vk 1
sl 1
tf 1
mk 1
yg 1
ll 1
gi 1
qj 1
pi 1
hu 1
ri 1
cq 1
ka 1
uw 1
uq 1
b...

output:

Stage: Lkhqlyxgbpaojvggczqtutbllbwfogzxbemtmlzqaucqvstmylgqphrckuubsngfrmectnbexnnodkytvzrjqwxmljjzszlobefzojbpzmbmehdyxfvwimuwxknacauh

result:

ok single line: 'Stage: Lkhqlyxgbpaojvggczqtutb...efzojbpzmbmehdyxfvwimuwxknacauh'

Test #46:

score: 0
Accepted
time: 0ms
memory: 2300kb

input:

128
xg 1
hw 2
pp 1
vi 2
cf 1
wg 1
fn 1
vv 2
pu 2
uy 2
io 2
pq 2
cg 2
lj 1
nj 2
lw 2
qs 1
ln 2
uc 1
sh 2
yu 1
dm 2
ec 1
cn 1
mu 2
zv 1
ya 2
ia 1
vz 2
po 2
ib 2
yc 2
rd 1
bm 2
uu 1
mw 2
kj 2
xa 1
gg 2
eo 1
uu 1
vv 1
mm 1
hf 1
zd 1
lc 1
aw 2
nz 2
gf 2
yn 2
ed 1
qm 1
bn 1
ix 2
nq 2
zd 1
pa 2
sc 2
ja 1
g...

output:

Stage: Hvvpuipcnllsdmyvpiybmkgangyinpsgbukbqzlblhehusycmkgrjzcmlvkysmtkcv

result:

ok single line: 'Stage: Hvvpuipcnllsdmyvpiybmkg...bqzlblhehusycmkgrjzcmlvkysmtkcv'

Test #47:

score: 0
Accepted
time: 0ms
memory: 2152kb

input:

128
zy 3
iu 2
py 2
eh 2
wp 2
qj 3
vk 1
ff 1
zd 3
do 2
nt 2
hl 3
nk 1
uj 1
uc 3
ax 3
vp 2
tu 1
cb 2
za 1
hg 2
vi 1
de 3
tg 2
st 3
tp 3
zr 2
yz 1
cf 2
jx 3
rx 3
ay 1
hz 2
kp 1
jb 1
at 2
aj 2
jc 3
nj 1
ji 1
lp 2
to 1
jh 1
yi 2
mn 1
ep 2
ii 3
sx 3
bi 1
gx 1
zy 2
nt 3
fs 2
uo 1
jx 3
zz 2
jx 2
nm 2
uk 2
p...

output:

Stage: Zqzhuadstjrjisnjfqlpmzzpdzitzzy

result:

ok single line: 'Stage: Zqzhuadstjrjisnjfqlpmzzpdzitzzy'

Test #48:

score: 0
Accepted
time: 0ms
memory: 2088kb

input:

128
mm 4
mr 4
um 2
jo 4
iw 1
fy 1
el 1
tl 1
km 4
ma 3
no 3
uz 2
nw 2
cx 2
fj 3
bu 4
im 2
te 1
fb 1
ob 2
zw 1
ni 1
yk 2
cz 1
xv 2
re 1
fv 2
xn 1
el 2
ob 2
xp 4
uu 1
qj 4
ir 3
qu 1
ti 1
yg 2
vn 1
qi 4
tc 3
xk 1
ud 3
tt 2
pi 4
zf 3
iy 3
qz 2
au 3
ee 4
xk 2
xb 1
xs 2
nx 3
ya 2
ax 3
ry 1
st 1
dt 3
fu 3
t...

output:

Stage: Mmjkbxqqpeyskpvarwcdkytmwy

result:

ok single line: 'Stage: Mmjkbxqqpeyskpvarwcdkytmwy'

Test #49:

score: 0
Accepted
time: 0ms
memory: 2144kb

input:

128
cd 2
jg 3
cw 3
tn 5
cg 3
dg 1
qm 2
dn 5
uq 4
nl 3
ab 5
mc 3
ye 4
wt 1
dc 2
uv 5
rr 4
bt 3
bw 5
rh 2
dj 3
xe 5
ae 3
ps 3
yp 2
pt 5
di 4
ei 1
pn 5
wu 4
oo 5
wr 2
gg 1
jx 5
fb 1
lb 3
tv 4
dp 2
cg 2
zs 3
vk 5
zj 5
qo 4
cp 1
lb 2
bm 2
yu 3
bj 5
dl 5
fq 5
sa 5
tv 1
vb 1
zd 1
we 2
sl 5
pq 2
yr 4
lb 5
y...

output:

Stage: Tdaubxppojvzbdfsslyrrxfwigktkhpytr

result:

ok single line: 'Stage: Tdaubxppojvzbdfsslyrrxfwigktkhpytr'

Test #50:

score: 0
Accepted
time: 0ms
memory: 2160kb

input:

128
qx 1
xs 1
nsn 1
efi 1
st 1
iz 1
nn 1
yc 1
jlg 1
rs 1
yb 1
cw 1
ke 1
ae 1
fd 1
zzv 1
adb 1
zs 1
ptj 1
je 1
cv 1
ilj 1
zf 1
hdj 1
yym 1
ewf 1
ge 1
cfa 1
kb 1
gdh 1
zj 1
od 1
emx 1
bb 1
iym 1
fjq 1
kl 1
mwc 1
ea 1
cxg 1
rp 1
me 1
yh 1
dib 1
xzj 1
rf 1
rhh 1
pv 1
rgp 1
lom 1
lpg 1
wee 1
vqw 1
amh 1
...

output:

Stage: Qxnsefsinyjlryckafzzadzptjcilzhdyyewgcfkgdzoembiyfjkmwecxrmydixzrrhprglolpwevqamwqzpvbinomeiwxrfnfcwycobinvcbysaobzbamnubswjcunroffbpajhxojrbpmycerlmxpifrfpwhxternlragbxmurgqaetrgblqehkqzrdr

result:

ok single line: 'Stage: Qxnsefsinyjlryckafzzadz...ternlragbxmurgqaetrgblqehkqzrdr'

Test #51:

score: 0
Accepted
time: 0ms
memory: 2228kb

input:

128
ho 2
tp 1
rc 1
sdn 2
rmj 1
eu 2
unx 1
pwp 1
phi 1
ohl 1
yc 2
kzn 2
pp 2
qwf 2
mn 1
ms 1
kv 1
em 2
ch 2
mie 2
db 2
eq 1
rd 1
yam 1
dae 2
xu 1
zrm 2
jv 1
zx 1
xea 1
mw 1
kft 1
pmc 1
ig 2
xz 1
xel 1
fpy 2
jre 2
ozp 2
qn 1
zxd 1
uw 1
tst 2
dvj 2
xwd 2
be 1
hta 1
sx 1
iwc 2
eb 2
hvc 2
tc 1
qw 2
ix 1
...

output:

Stage: Hsdeykzpqwecmiddazrifpjroztsdvxwiwehvqvtixeuotzxpedwlauafteyapxiajfbhkiuggnvlxnodaggdfclrryw

result:

ok single line: 'Stage: Hsdeykzpqwecmiddazrifpj...pxiajfbhkiuggnvlxnodaggdfclrryw'

Test #52:

score: 0
Accepted
time: 0ms
memory: 2080kb

input:

128
xk 1
ymk 1
ly 2
lml 3
lsa 1
pjo 3
ldb 2
qa 1
ej 2
frf 2
ag 2
ywv 1
iwg 2
xc 1
won 2
di 1
qck 1
oay 1
ish 2
zj 2
nx 3
pl 2
vn 2
cx 1
in 1
xqw 2
qn 3
riw 3
yxn 1
yys 2
cdj 2
yah 1
noo 2
pc 1
djf 2
vh 1
yxo 1
thi 2
zoz 3
xy 2
gcn 3
cl 1
kg 2
ia 3
yu 1
snd 3
fak 3
ma 1
lub 1
iid 2
pi 3
rk 2
mbb 3
bg...

output:

Stage: Lmpjnqrizogcisnfapmbtqrewvnznbjcwrwttncbetksubtv

result:

ok single line: 'Stage: Lmpjnqrizogcisnfapmbtqrewvnznbjcwrwttncbetksubtv'

Test #53:

score: 0
Accepted
time: 0ms
memory: 2080kb

input:

128
ru 1
dgg 4
da 3
kta 1
cjq 1
sa 1
ka 4
yvd 3
dmw 2
sx 1
fyg 3
il 2
lad 2
zmd 3
bp 4
uk 1
vp 1
os 3
cje 2
zj 3
la 2
qm 3
ner 2
ae 1
lh 2
ui 3
us 3
njk 4
hd 4
hv 1
pvu 4
rs 1
dvh 2
jo 2
bk 2
zlr 4
awq 1
ia 1
bu 1
qbi 4
qm 3
vdm 1
an 2
iq 4
bko 1
fj 3
pho 3
vjo 1
im 4
shn 4
jhw 1
oc 1
yi 3
wx 4
tiz ...

output:

Stage: Dgkbnjhpvzlqbiishwznfuxqhnszwozvyzbymvuhfgq

result:

ok single line: 'Stage: Dgkbnjhpvzlqbiishwznfuxqhnszwozvyzbymvuhfgq'

Test #54:

score: 0
Accepted
time: 0ms
memory: 2296kb

input:

128
il 4
wz 1
irn 1
ra 2
rx 1
gzn 1
fso 3
hr 1
sm 5
ow 3
fz 1
gt 3
aud 5
ckj 5
aav 5
vf 2
pl 2
jyu 3
kh 1
ec 1
ab 3
ur 2
ma 1
wj 5
jnt 4
sax 2
cp 5
nmo 3
nj 1
lwm 5
xeb 1
yzx 2
pa 3
kh 5
ix 2
yf 1
paf 3
wmj 1
xwa 2
sux 2
am 1
qbs 2
vt 2
xh 1
qyc 4
rv 2
rl 2
en 3
pn 3
aj 4
ou 5
btx 1
ayc 3
brz 5
qvm ...

output:

Stage: Sauckaawclwkobrwtmarnyrlupulpcpngmricwijjpnhgsolaq

result:

ok single line: 'Stage: Sauckaawclwkobrwtmarnyrlupulpcpngmricwijjpnhgsolaq'

Test #55:

score: 0
Accepted
time: 0ms
memory: 2176kb

input:

128
wf 1
jlqq 1
fi 1
jfh 1
rbc 1
lrg 1
kive 1
lkm 1
pe 1
kz 1
nivv 1
yflx 1
nai 1
qk 1
im 1
oi 1
fqi 1
ru 1
zaqy 1
du 1
dht 1
ex 1
jab 1
ifr 1
ai 1
vf 1
dc 1
ini 1
qn 1
pfai 1
ru 1
gaub 1
lr 1
ukg 1
iphg 1
poj 1
pyau 1
lfmr 1
oytw 1
ymux 1
gtm 1
ggiz 1
agj 1
cs 1
ad 1
gyeo 1
yao 1
iwqg 1
udwd 1
zsgo...

output:

Stage: Wjlqfjfrblrkivlkpknivyflnaqiofqrzaqddhejaifavdinqpfargaulukiphpopyalfmoytymugtggiagcagyeyaiwqudwzsgtstqddbnknhsehqslvdtqwkoirvtjvrodbypudsvblhljcxfdumhxtnnwcpnaxrtkayeblcjbrixfnnzfhnxjczkmkjzyrwcxtdffvcjstekccxfvorrqhwktbuhyqeorkrjubjbkcyxygwffhwcmifxandhh

result:

ok single line: 'Stage: Wjlqfjfrblrkivlkpknivyf...eorkrjubjbkcyxygwffhwcmifxandhh'

Test #56:

score: 0
Accepted
time: 0ms
memory: 2156kb

input:

128
mx 2
gm 1
uxhy 2
qt 2
mdv 1
uxo 2
duuq 2
gfpb 1
bzkw 2
lz 1
fwo 2
ysqa 2
cq 1
rkw 2
gbd 2
say 1
yirh 1
cj 2
nzqn 1
ibzv 1
oey 1
ow 1
byvw 1
jbak 2
si 1
od 1
wspb 1
mf 1
hyp 1
zfdh 2
oqeg 1
kt 1
wqls 1
tds 2
xow 1
bhr 1
qs 2
vm 2
gp 1
jt 1
ry 2
wve 2
lo 1
gjas 1
iy 1
ullr 2
jj 2
zwa 2
fvmb 2
vd 1...

output:

Stage: Muxhquxduubzkfwysqrkgbcjbazfdtdqvrwvulljzwfvmwoythqwgmvwtiwtxcnmicbuaapwdxrsvguekdlujzsdreulisbmcxlwffpqbalxlnaaa

result:

ok single line: 'Stage: Muxhquxduubzkfwysqrkgbc...lujzsdreulisbmcxlwffpqbalxlnaaa'

Test #57:

score: 0
Accepted
time: 0ms
memory: 2152kb

input:

128
zkh 2
bufc 1
lgg 2
ni 2
gnh 3
pgys 3
zd 2
vq 3
xce 3
hqnd 2
plbp 3
zba 3
dcl 2
nnji 2
hft 3
zl 2
kjyc 2
xsk 3
hpq 2
humw 3
jae 2
dmrx 1
vbv 1
yul 3
gyu 1
ap 1
vwc 3
oga 3
koca 1
op 1
pkmf 1
yky 1
mc 3
ucu 3
jxur 3
jkjr 2
gau 3
vrxv 1
fiqz 1
skgh 1
xtad 3
hh 3
szd 3
hmo 2
zpbn 1
vz 2
sc 1
hos 3
p...

output:

Stage: Gnpgyvxcplbzbhfxshumyuvwogmucjxugaxtahszhoppoaorxczrbjjoqujpkxnzsvzqmjhpdpkjtkqdjuazftlcmplhogofquhvewszsppmv

result:

ok single line: 'Stage: Gnpgyvxcplbzbhfxshumyuv...qdjuazftlcmplhogofquhvewszsppmv'

Test #58:

score: 0
Accepted
time: 0ms
memory: 2128kb

input:

128
tc 1
myqp 1
stm 4
wd 1
oeu 1
vur 1
cb 4
qtk 3
pygr 2
yil 2
nui 4
py 3
psj 1
gypd 1
tr 2
wjy 4
bcg 2
lq 2
hqqi 3
ewh 3
wr 2
gbc 2
vh 3
hh 2
pho 2
ldo 1
cj 4
olv 1
qft 4
uktb 4
ztix 3
qcrf 1
ope 1
whkr 2
aona 3
lev 4
ll 1
cda 2
jxkh 3
alow 2
vcqy 3
iw 2
qw 2
wr 2
yszu 3
ol 1
uva 4
rhcw 1
twuo 3
zb...

output:

Stage: Stcnuwjcqfuktleuvzbhbdznmbduopeiknknxaqvjryapdluaiaqzeihpver

result:

ok single line: 'Stage: Stcnuwjcqfuktleuvzbhbdz...peiknknxaqvjryapdluaiaqzeihpver'

Test #59:

score: 0
Accepted
time: 0ms
memory: 2148kb

input:

128
kqa 3
oq 1
ay 4
uh 5
ybfu 4
bi 2
zum 4
czxa 5
chtm 4
mzn 5
raxz 4
jnnd 2
xzgl 5
nd 1
rlrz 2
yv 3
jn 5
mj 2
sxjp 4
vqdu 5
qxc 5
iqo 5
drrp 4
lnb 2
eoju 3
wgl 4
apea 4
mhm 4
gvmn 5
fb 4
lgve 3
vp 5
tfc 4
jp 3
uuhi 1
rdj 1
hryw 1
sazy 1
aym 5
jni 5
sfj 5
ibtl 3
zh 4
xew 2
ahkg 2
kb 3
bwdb 1
rqw 5
w...

output:

Stage: Uczxmzxzgjvqdqxiqgvmvayjnsfrqxxctuhvrscjadhecxyjjoupbiryhtiyrtzuhcq

result:

ok single line: 'Stage: Uczxmzxzgjvqdqxiqgvmvay...rscjadhecxyjjoupbiryhtiyrtzuhcq'

Test #60:

score: 0
Accepted
time: 0ms
memory: 2176kb

input:

128
cnoi 1
rmi 1
ttavx 1
wohuo 1
da 1
hv 1
dfx 1
ggmp 1
bg 1
btqv 1
czjej 1
bdbp 1
yy 1
bqch 1
kn 1
janyy 1
uatd 1
ai 1
mq 1
qfy 1
mh 1
eu 1
xyy 1
gjojk 1
ysqf 1
qq 1
ex 1
xayny 1
vivpa 1
bmzh 1
drg 1
us 1
poyyc 1
jlv 1
whiv 1
gco 1
uktiw 1
yu 1
qdk 1
wg 1
wgra 1
cinl 1
sk 1
hlem 1
vfruc 1
cleu 1
qc...

output:

Stage: Cnormttavwohudhdfggmbbtqczjebdbybqckjanyuatamqfmexygjojysqqexaynvivpbmzdrupoyyjlwhigcuktiyqdwwgrcinshlevfruclequvbkqldilpnuymwodrdtkiauatfinlwwbunjmdatcolstplvrzcvqfoohbhccxrvyftnubcfonvffrcppptwaxtvjtzdwcksjaeymcjdftgwdpneklqgokkjqqqhttpdotsthwuwhlmhmcktjktolbfoxtbbobqqdatmnxisxfyzsfzvwexyko...

result:

ok single line: 'Stage: Cnormttavwohudhdfggmbbt...cortlugshuhnvsukskczhrfreqktvaa'

Test #61:

score: 0
Accepted
time: 0ms
memory: 2180kb

input:

128
wbvt 2
rdi 1
fudch 1
qfb 2
dpe 2
ovqf 2
jf 1
lp 1
klox 1
xa 1
ypd 1
tycd 1
wcm 1
kgq 2
ybq 2
hrb 2
wuqh 1
gwksf 1
cysda 1
bed 2
ou 2
tj 1
dcg 2
fdpis 1
je 2
ntkh 1
cwouk 1
rnu 2
jh 2
kpwp 2
jyqlv 2
ozqex 2
pc 2
xbz 2
llq 1
snzj 1
mgqc 1
taej 2
lk 1
sku 2
yrnpd 1
fohgh 2
nzkas 2
kymw 2
fzpq 1
cvo...

output:

Stage: Wbvqfdpovqkgybhrbeodcjrnjkpwjyqlozqepxbtaeskfohgnzkakymcvoxwxfxaqrbggpxibtcwdzqsxalhwmebflxbeenvhnvatvjiosjibuokmdrnkdnrhsapmmarnlefpaomildrkyfutaxwytrapvqs

result:

ok single line: 'Stage: Wbvqfdpovqkgybhrbeodcjr...marnlefpaomildrkyfutaxwytrapvqs'

Test #62:

score: 0
Accepted
time: 0ms
memory: 2168kb

input:

128
jxhr 3
vn 2
foig 1
ht 3
rna 3
caq 1
ys 1
vut 1
qzlv 2
pw 2
ibic 3
hbe 1
fa 1
prwc 2
lyb 3
oomjc 2
wr 1
kjsl 1
jgatd 3
mq 2
yc 2
trpi 3
lmy 1
nwhxt 3
ttsz 2
hkz 1
felo 1
djfnf 1
uxeo 3
vfjl 1
yot 2
pgw 1
fj 2
msi 2
aoptx 1
xtk 2
gt 1
dqsj 3
tsx 1
tokwd 3
dj 1
doae 1
qzlhb 1
chlbw 2
jnxr 1
hevp 3
...

output:

Stage: Jxhhrnibilyjgattrpnwhxuxedqstokwhevvpddjudzshwriwaosnlsjzgssnbrgbvjzmysblneyerpaqrsojj

result:

ok single line: 'Stage: Jxhhrnibilyjgattrpnwhxu...jzgssnbrgbvjzmysblneyerpaqrsojj'

Test #63:

score: 0
Accepted
time: 0ms
memory: 2120kb

input:

128
zodg 1
rsvpo 1
nekfd 3
ousb 2
lnq 3
oyd 4
yh 1
dcbwl 1
wj 3
xwv 4
ixm 4
bnvz 3
tsyxd 2
hevf 1
yys 1
qjbr 2
vaz 3
iusvo 1
gicnf 1
otg 2
mganq 3
nbilj 2
xjblb 3
ml 2
vgka 3
yx 1
pwr 4
jlel 3
hugua 3
fbzn 3
mkieh 2
bwx 2
lxtis 3
sti 4
fvqq 4
te 1
sp 1
hcsce 3
lbr 2
rvl 4
du 4
rn 4
dxh 3
pssnd 1
ccf...

output:

Stage: Oyxwixpwstfvqrvdrilgkejedxnpcemkahqwzqkvylkrderosoakmnqnhzjfyufdaw

result:

ok single line: 'Stage: Oyxwixpwstfvqrvdrilgkej...wzqkvylkrderosoakmnqnhzjfyufdaw'

Test #64:

score: 0
Accepted
time: 0ms
memory: 2136kb

input:

128
pykw 2
ryvz 3
amlv 5
fyenn 4
edj 5
jx 2
lehs 4
ll 2
zyawx 4
mbn 3
pi 2
vury 4
hcaqv 1
ky 4
ks 4
wr 2
eplp 4
ujs 4
oarfq 5
ccta 5
vv 5
fodle 4
ssd 5
hvrb 3
jq 4
zbau 3
vhv 2
zcghu 3
metv 1
vggtk 1
ngdv 1
rusv 1
xl 1
hfjj 5
uxid 1
zw 5
oelt 3
ml 4
aqqxl 2
jwbsi 5
xa 2
mlmj 3
dbh 1
pq 4
aw 2
fdajh ...

output:

Stage: Amledoarfcctvsshfjzjwbsfdajfolnuvnnnnikmlrdgiwsrdnnbyuetmeikj

result:

ok single line: 'Stage: Amledoarfcctvsshfjzjwbs...nuvnnnnikmlrdgiwsrdnnbyuetmeikj'

Test #65:

score: 0
Accepted
time: 1ms
memory: 2228kb

input:

1000
dehjgabuvp 5
qmadzscnzg 10
jkgnoxbtwo 7
pb 3
limigtkledgmpey 1
lkimi 5
kgwtwfqsyfnwteftdjbi 2
caop 9
fmzxbjzzbqhil 6
szslrb 5
xrwu 1
jwptgllnojuerc 7
vadrwmqnnzrwlyoqfbz 7
igevphiayhdrv 9
tjmdoymyglxfz 3
ocjfdzk 8
mz 3
kluzlon 8
nejujwakhkhlpelom 6
lzbvprvqaduny 4
je 9
txg 6
cjrugrmkfzyfsaarvts...

output:

Stage: Qmadzscnzcopkwtojwtoyvwdhhmbdlnqhqtwobnlwotwpazayygfakmgjxcajisrnibrqlenmnkqitklqjaxkgszsfljfyldpcngnvdcjlgebsdppnnpleqmrsusslmslplcwggnrmenbrkykmoaqlsvixqmkconawxyhjomutarovdwokmrijxwwlkwmckuoltojlauaiczmtebqlzutbepdlzourticrvfcatzwuhmguoxovxwqpwqyzmqdxylpdgybrjhgxmzpcdmugkjpjjphzfcslamzmjuc...

result:

ok single line: 'Stage: Qmadzscnzcopkwtojwtoyvw...vzrtzyshlgznhbhefpszmjkzjrrtvti'

Test #66:

score: 0
Accepted
time: 1ms
memory: 2336kb

input:

1000
xcsisrpbiz 1
gfivfs 4
suwzcxpsvfv 9
ocdqtdarwzlrwrj 5
bunwfewbp 6
qtterbgxzoe 9
exepfguacclgir 5
linpesd 1
gvlmp 4
hyva 9
uzhxxotoztm 7
wmf 3
rfqltbxjsacxsco 5
jjfkxejcsswf 7
bzlucxyhtggovsg 10
znlhejnexodrxi 4
rhrauslgmymdac 5
fyykgfwnvuatqg 2
galjxgqtyztjxmt 5
gauyncykfym 7
fddyxzgqbtrnpd 5
q...

output:

Stage: Bzlucxyhtggovscessdppmjkyykgincfrebrlaydxouizwsqscuhgszjmowgggokzkygjsjusislegypbnyfjkstxznkxcirxctizaeohsjysvvcdczbtsgdxwnyzlikuntzmfatnggiocvsdywgaurpabguisdewqqeytnlxhccwlerjqlctacautxpmpawtrsvajexlpertdzctynsjtmllzjjefaybdghctengbjsgpgjcvpyxnmnwbeylaxodqesuyvtkicdkmkcisevhsmkdqepbrcrruksx...

result:

ok single line: 'Stage: Bzlucxyhtggovscessdppmj...gccauxdjcgopxjvcmocvsyrsayjndhf'

Test #67:

score: 0
Accepted
time: 1ms
memory: 2292kb

input:

1000
ctkng 1
zujyat 2
txkqj 2
zvqnlnhudrnbx 1
sxjspnqtz 3
aczqcinpit 2
mwgjfvuhx 3
zddwvqrhkpargju 2
wbboucxbwbrmeq 1
wobujveetz 3
dlb 3
keitvyxtpsv 3
zuuzcahklcyxjym 3
cwvtgwelrg 1
exnabpqb 1
abkeavgdlrrn 2
rlbglleol 2
zzj 1
tgfnkmbi 3
yo 2
vsrykomfiu 3
dmfopwty 2
godkwzghukd 2
ledinqaosrvi 1
xmtzv...

output:

Stage: Sxjspnqtmwgjfvuhwobujveetdlkeitvyxtpszuuzcahklcyxjytgfnkmbvsrykomfixmtzvukerzcgiatadodcgudsvvlwyebsukjqrijqjwhksbuolihhfnxlktllgpbplumqmpkixkelajknhlyzqzeweoiofboscavawhqgfsjbnhnqyqbtnbzirmdoacwokcvcefzwptdscjjrywvdjmxzsakeobjarcuysyzbjjjfturgnenoglfageamqtjexiyazeibwzplhhxzncrookxaarirdyslor...

result:

ok single line: 'Stage: Sxjspnqtmwgjfvuhwobujve...awwaenvpipqrwuljngwmzulfmjithml'

Test #68:

score: 0
Accepted
time: 1ms
memory: 2188kb

input:

1000
npuwsubjmdjo 3
mwxbrracqq 2
tp 1
wumfhbwvvimtakl 1
lmbuhfvrashwnb 1
aagjntkqsigsvc 1
ih 3
focnequlwaotcvta 3
ojvgd 3
trzbzspvvrujzmh 3
zdyifazh 1
gyazvcyoyklkfckzem 2
tqqa 3
oo 1
vrohlbqne 1
qaylzodpf 1
qrosossjjwdlpjlcwm 1
pyug 1
zs 3
rrxdnkigdxutazafqc 1
gch 2
ucs 2
gekyka 1
wykcvmo 1
itkotci...

output:

Stage: Npuwsubjmdjifocnequlwaotcvtojvgtrzbzspvvrujzmtqqzwhhkiakismwjbrkbnjqcuhthmvizoissoszzmbrbtsegkvtcfctdxxgbjqixvitaropnrvxmkzwzsqnghpjbzzwcwqiffqsuvwfollsxnhhfpjjdoqmijnbjbeamgasoerpcqqxocqrkjubityvyzqkhpqqlxomnbfjjhpqzlxtletbuoivfypssiidtxfdjtzridqdnhqbbcoeedwxnbpzijvgdnourhinwctkyqevtxpoiqiev...

result:

ok single line: 'Stage: Npuwsubjmdjifocnequlwao...bxzqxaoflssscexistzvdkumkjtsqyb'

Test #69:

score: 0
Accepted
time: 1ms
memory: 2248kb

input:

1000
kgbimhbyigupkbjxmlc 1
gdwvrt 1
gtcnsq 1
cmy 1
nconcpbl 1
clitaruihnbjz 1
nzkkwiqehspyryv 1
rkidtqqhwb 1
hpvsxgfrkdamjd 1
tyvpa 1
zdyyzx 1
abubbiyc 1
elxvlkrrsmrhbbtylo 1
fszhfnrtasoaejzjtorr 1
dcazdmkqrmfwnuxt 1
fpduntubdbc 1
mung 1
bgud 1
mtakwqiki 1
woft 1
abog 1
bizk 1
kzj 1
obopdfxcncaiakbx...

output:

Stage: Kgbimhbyigupkbjxmlgdwvrgtcnscmnconcpbclitaruihnbjnzkkwiqehspyryrkidtqqhwhpvsxgfrkdamjtyvpzdyyzabubbiyelxvlkrrsmrhbbtylfszhfnrtasoaejzjtordcazdmkqrmfwnuxfpduntubdbmunbgumtakwqikwofabobizkzobopdfxcncaiakbxeqrnjwmabcobukewwqnrjcduqtjtnhvfslyjsbyrsylmovmmulcvchlehlrnfaslehgfwedxjuubetjpqgfvselvdv...

result:

ok single line: 'Stage: Kgbimhbyigupkbjxmlgdwvr...sxnfyvxxmblpaakmoboujgkugugjloq'

Test #70:

score: 0
Accepted
time: 1ms
memory: 2208kb

input:

1000
hwtsqvwqtlyxcvnbsrcd 1
tykfpcnnimfcodrjytok 1
jlbcfmeqy 1
laotrzdcjywolnev 1
bh 1
mdaeq 1
vdx 1
nqnqtdqakewajxlq 1
qleytbbkkdwc 1
ozgttgvrdgl 1
bixoxgrvxosi 1
ln 1
qqyfydqinwfixeerds 1
ajltkvobu 1
jqvmoeeaoyicqylvwbej 1
hljvbglblqhfzbewp 1
jxhvd 1
glgkcyn 1
flbrqxtkghjtucju 1
dwkdck 1
wupclvhti...

output:

Stage: Hwtsqvwqtlyxcvnbsrctykfpcnnimfcodrjytojlbcfmeqlaotrzdcjywolnebmdaevdnqnqtdqakewajxlqleytbbkkdwozgttgvrdgbixoxgrvxoslqqyfydqinwfixeerdajltkvobjqvmoeeaoyicqylvwbehljvbglblqhfzbewjxhvglgkcyflbrqxtkghjtucjdwkdcwupclvhtijfbnkwradzrodxeojrkimahevjrrlxsyrtscyqvmcgjzwzcoqwnusaahcojjgrgmuzxhwtqhvhmtey...

result:

ok single line: 'Stage: Hwtsqvwqtlyxcvnbsrctykf...zyzewmyemrdcwahasmbwoqqkxovtdpu'

Test #71:

score: 0
Accepted
time: 0ms
memory: 2316kb

input:

1000
ugthvpavxrzfdyuhefay 1
qrttxt 1
wkzwhgmvvoqgqfahf 1
xtdkhlcclflwn 1
ounao 1
motdjtmmhqchaphn 1
nvttnfqipvmsh 1
ilpvwmeehztktxkvvogv 1
cf 1
xleuyucuqfo 1
ulfyzpfjclk 1
kjshgwcws 1
macawmrxiopmdlw 1
szaaaup 1
txyhlmaq 1
muepfglvkezzyidvywq 1
kjwwodfjgk 1
fbgusuxwdsqcyl 1
leewi 1
lgixtxyatpucbhkbb...

output:

Stage: Ugthvpavxwkzwhgxtmotdjnvilpvwmeehmacamuepfglvfbglgixtxyavfvkhkxvhwxynrmtyanvypumdbqiyqenfpeixqfmbjkxqxnbflubgzvtzckfabmunlhvgtzfzisbowutoenutiuqoijfqxrexadqeovkvkgpgrfqztufnaazbigypnradqtxenvbgsykcvebcbrvywmenrtrseuwahtllynrfdefmoqmsvsplrxnlgsrfkvumflfxqwfzlfzvklflhgarqqoajkqzbvsjahniudbncvyr...

result:

ok single line: 'Stage: Ugthvpavxwkzwhgxtmotdjn...hgftnfesqtpiesylzuqnilpeosxboat'

Test #72:

score: 0
Accepted
time: 1ms
memory: 2176kb

input:

1000
oyffniw 1
ub 1
lxd 1
lzsjac 1
exgtscmqkzxerfcb 1
ebexj 1
tisniwkwjnbgvnkgcqe 1
ymoajnyizbphqdsjmxc 1
ntg 1
znoqcocuwvwdxzeelbf 1
fbyeyllnuj 1
nqvxfc 1
vhexssttcictzuu 1
obavulfvcbeyqcjpi 1
npuphujfgwkjgl 1
fzdhvapgbvq 1
jopcciblfxeekjy 1
jstcrnosotseuvjo 1
ftqqzfap 1
gzzqwlsjnwwgiwz 1
mldbindmg...

output:

Stage: Zasyrvsivbyfvftnwvmpaskcevdtfrozjebdhwnengnyxg

result:

ok single line: 'Stage: Zasyrvsivbyfvftnwvmpaskcevdtfrozjebdhwnengnyxg'

Test #73:

score: 0
Accepted
time: 0ms
memory: 2372kb

input:

1000
pzyecswzotaykksnvif 1
owd 1
laqwpxwvxodgjiejrwdm 1
xgpzshgymdfbdqmc 2
vdxdpxeyfvdadyvhcezp 1
cgyoohnrojavvtmai 1
ayeydgrfiurqvtsb 1
prtdzynrho 1
iunmeqmzijkvuwvmm 1
sozev 3
vqjatnrfpartcwijgapu 1
ydbazdz 1
kjdisjcxuxytonjpwa 1
lnohiasptjocaa 1
ibabiqx 1
zflngpe 1
jrqmoaygbudw 1
bmb 1
hop 2
jsod...

output:

Stage: Qlhnrhvesrso

result:

ok single line: 'Stage: Qlhnrhvesrso'

Test #74:

score: 0
Accepted
time: 0ms
memory: 2232kb

input:

1000
hfdsokhcaoz 1
tihdqmtqswygjjbaj 1
buaqrhfabmrvmolvn 1
bgdytregzbdrw 1
gfgzqizrducsxtkfgg 1
diqzbbsuazy 2
musw 1
kdga 1
wjkhcbgduziijklfh 1
zp 6
rzvyosmjtdmox 2
hnzclfbptabahjitcjve 1
sqlqjspmahruvj 1
klwxhojxuiaut 2
rkxbramckbbkeswv 1
dhzbjih 2
plfvpzctsdashf 1
sfdevsjxrnlrmjpk 1
tz 2
jnddudtr ...

output:

Stage: Elpzj

result:

ok single line: 'Stage: Elpzj'

Test #75:

score: 0
Accepted
time: 0ms
memory: 2352kb

input:

1000
pejittcreeipfywcfmkb 1
exuruqkurctpzmpgunsc 1
tlgewmtnshrfqogngozj 1
erscdqeyjpbthjbkrfly 1
blzkoomrxfxiltolrrgb 1
brzdmgpljzmuhwpobhxn 1
szjfldbvbckfveayzlfa 1
pwonltphtwujfntnxzdl 1
qbdkqypknueqvljeppjq 1
abnaokamghrifslmjvcx 1
fcpatikrschfmhqqthiq 1
ixtdajstljwprrttshvu 1
gtvvzfffbbcsqrkqvfj...

output:

Stage: Pejittcreeipfywcfmkexuruqkurctpzmpgunstlgewmtnshrfqogngozerscdqeyjpbthjbkrflblzkoomrxfxiltolrrgbrzdmgpljzmuhwpobhxszjfldbvbckfveayzlfpwonltphtwujfntnxzdqbdkqypknueqvljeppjabnaokamghrifslmjvcfcpatikrschfmhqqthiixtdajstljwprrttshvgtvvzfffbbcsqrkqvfjxidotxprldexomlevuaagxjdppplezrtqekqzymqfxpklq...

result:

ok single line: 'Stage: Pejittcreeipfywcfmkexur...ksmoaydtnwogydcczugefafilzivdsb'

Extra Test:

score: 0
Extra Test Passed