jiahuimbzuai/CoQuIR huggingface dataset:
//  [go]
package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	sum := 0
	for i := a; i <= b; i++ {
		if i/10000 == i%10 && i/1000%10 == i/10%10 {
			sum++
		}
	}
	fmt.Println(sum)
}
//  [go]
package main

import "fmt"

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	ans := 0
	for i := 1; i <= 9; i++ {
		for j := 0; j <= 9; j++ {
			for h := 0; h <= 9; h++ {
				x := i*10000 + j*1000 + h*100 + j*10 + i
				if a <= x && x <= b {
					ans++
				}
			}
		}
	}
	fmt.Println(ans)
}
//  [go]
package main

import "fmt"

func reverseString(s string) string {
	rs := []rune(s)
	for i, j := 0, len(rs)-1; i < j; i, j = i+1, j-1 {
		rs[i], rs[j] = rs[j], rs[i]
	}
	return string(rs)
}

func main() {
	var a, b int
	fmt.Scan(&a, &b)

	var ans int
	for i := a; i <= b; i++ {
		s := fmt.Sprintf("%d", i)
		rs := reverseString(s)
		if s == rs {
			ans++
		}
	}

	fmt.Println(ans)
}
//  [ruby]
A, B = gets.chomp.split
cnt = 0
(A[0..1].to_i..B[0..1].to_i).each do |i|
    j = i.to_s.reverse.to_i
    (0..9).each do |k|
        cnt += 1 if (i * 1000 + k * 100 + j).between?(A.to_i, B.to_i)
    end
end
puts cnt
//  [ruby]
a,b = gets.chomp.split.map(&:to_i)

dig_2 = Array(a/1000..b/1000)
ans = 0

dig_2.each do |i|
    for j in 0..9
        x = i*1000 + j*100 + i/10+(i%10)*10
        if a <= x and x <= b
            ans +=1
        end
    end
end

p ans
//  [ruby]
a, b = gets.chomp.split(' ').map(&:to_i)
#p a                                                                                       
#p b                                                                                       

n = 0

# 安直に全探索                                                                             
[*1..9].each{|x|
  [*0..9].each{|y|
    [*0..9].each{|z|
      tmp = 10001 * x + 1010 * y + 100 * z
      n += 1 if a <= tmp and tmp <= b
    }
  }
}

puts n
//  [ruby]
a,b = gets.chomp.split(" ").map(&:to_i)
cnt = 0

(a..b).each do |number|
  if number.to_s.split("").join.to_i == number.to_s.split("").reverse.join.to_i
    cnt += 1 
  end
end

puts cnt
//  [ruby]
A,B = gets.split.map(&:to_i)
a = 0
for i in A..B
    if i.to_s.split('') == i.to_s.split('').reverse
        a += 1
    end
end
puts a
//  [ruby]
a, b = gets.split.map(&:to_i)
puts (a..b).to_a.map{ |i| i.to_s.split('') }.select { |e| e == e.reverse }.size
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        a: u64,
        b: u64
    }
    let f_check: u64 = if format!("{}{}", a % 10_000 / 1_000, (a / 10_000))
        .parse::<u64>()
        .unwrap()
        >= a % 100
    {
        1
    } else {
        0
    };
    let l_check: u64 = if format!("{}{}", b % 10_000 / 1_000, (b / 10_000))
        .parse::<u64>()
        .unwrap()
        <= b % 100
    {
        1
    } else {
        0
    };

    println!("{}", (b / 100) - (a / 100) - 1 + f_check + l_check)
}
//  [rust]
use std::str::FromStr;
use std::io::*;
use utils::*;

pub fn main() {
    let i = stdin();
    let mut o = Vec::new();
    run(i.lock(), &mut o);
    stdout().write_all(&o).unwrap();
}

fn run<R: BufRead, W: Write>(i: R, o: &mut W) {
    let mut i = AtRead::from(i);
    let (a, b) = i.read2::<u32, u32>();

    fn is_palindrome(mut x: u32) -> bool {
        let mut xs = [0; 5];
        for i in 0..5 {
            xs[i] = x % 10;
            x /= 10;
        }
        xs[0] == xs[4] && xs[1] == xs[3]
    }
    let c = (a..b + 1).filter(|&x| is_palindrome(x)).count();

    writeln!(o, "{}", c).unwrap();
}

mod utils {
    use super::*;

    pub struct AtRead<R: BufRead> {
        r: R,
        s: String,
    }

    macro_rules! fn_read {
        {$f:ident($($v:ident: $t:ident),*)} => {
            pub fn $f<$($t: FromStr),*>(&mut self) -> ($($t),*) {
                let i = &mut self.read_line().split(' ');
                $(
                    let $v = next(i);
                )*
                ($($v),*)
            }
        };
    }

    impl<R: BufRead> AtRead<R> {
        pub fn from(r: R) -> Self {
            AtRead {
                r: r,
                s: String::new(),
            }
        }
        pub fn read_line(&mut self) -> &str {
            self.s.clear();
            self.r.read_line(&mut self.s).unwrap();
            self.s.trim()
        }

        fn_read! { read2(v1: T1, v2: T2) }
    }

    fn next<'a, T: FromStr, I: std::iter::Iterator<Item = &'a str>>(i: &mut I) -> T {
        i.next().unwrap().parse().ok().unwrap()
    }
}
//  [rust]
#![allow(non_snake_case, unused)]
use std::cmp::*;
use std::collections::*;
use std::f64::consts::*;

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!{
        a: u64,
        b: u64
    }
    let f_check: u64 = if format!("{}{}", a % 10_000 / 1_000, (a / 10_000))
        .parse::<u64>()
        .unwrap()
        >= a % 100
    {
        1
    } else {
        0
    };
    let l_check: u64 = if format!("{}{}", b % 10_000 / 1_000, (b / 10_000))
        .parse::<u64>()
        .unwrap()
        <= b % 100
    {
        1
    } else {
        0
    };

    println!("{}", (b / 100) - (a / 100) - 1 + f_check + l_check)
}
//  [rust]
use proconio::fastout;
use whiteread::parse_line;

#[fastout]
fn main() {
    let (a, b): (usize, usize) = parse_line().unwrap();

    let mut ret = 0;
    for i in a..=b {
        let s: Vec<_> = i.to_string().chars().collect();
        let mut s_rev: Vec<_> = i.to_string().chars().collect();
        s_rev.reverse();
        if &s == &s_rev {
            ret += 1;
        }
    }
    println!("{}", ret);
}
//  [rust]
use proconio::{input, fastout};
use proconio::marker::{Chars};
use proconio::marker::Usize1;
use std::cmp::*;

macro_rules! debug {
      ($($a:expr),*) => {
          eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

#[fastout]
fn main() {
    input!{
        a: usize,
        b: usize,
    }

    let mut cnt = 0;
    for i in a..b+1 {
        let num = i.to_string();
        let mut n1: Vec<char> = Vec::new();
        for j in num.as_str().chars() {
            n1.push(j);            
        }
        n1.reverse();
        let num1: String = n1.iter().collect();
        if num==num1 {
            cnt += 1;
        }
    }
    println!("{}", cnt);
}
//  [rust]
use std::io;
use std::str::FromStr;

fn input_tuple() -> (u64, u64) {
    let mut line: String = String::new();
    io::stdin().read_line(&mut line);
    let vec: Vec<u64> = line.split_whitespace().map(|s| s.parse().unwrap()).collect();
    (vec[0], vec[1])
}

fn digit_count(n: u64) -> u64 {
    if n == 0 {
        return 1;
    }
    for i in 0..20u32 {
        if n < 10u64.pow(i) {
            return i as u64;
        }
    }
    20u64
}

fn digits(n: u64) -> Vec<u64> {
    let mut m = n;
    let mut vec: Vec<u64> = Vec::new();
    let mut i = digit_count(m) as u32 - 1;
    loop {
        let l = m / 10u64.pow(i);
        vec.push(l);
        m -= l * 10u64.pow(i);
        if i == 0 {
            break;
        }
        i -= 1;
    }
    vec
}

fn main() {
    let (a, b) = input_tuple();
    let mut count = 0;
    for i in a..(b+1) {
        let d = digits(i);
        let mut flag = true;
        let n = digit_count(i) as usize;
        for i in 0..n/2 {
            if d[i] != d[n - i - 1] {
                flag = false;
            }
        }
        if flag {
            count += 1;
        }
    }
    println!("{}", count);
}
//  [swift]
let line = readLine()!.split(separator: " ").map{Int($0)!}
var count = 0
for i in line[0] ... line[1] {
  let numArr = Array(String(i))
  if (numArr[0] == numArr[4]) && (numArr[1] == numArr[3]) {
    count += 1
  }
}
print(count)
//  [swift]
import Foundation
func toTuple<T>(_ args: [T]) -> (T, T) { (args[0], args[1]) }
func readInts() -> [Int] { readLine()!.split(separator: " ").map { Int($0)! } }

let (a, b) = toTuple(readInts())
var ans = 0
for i in a...b {
  let fHalf = String(i).prefix(2)
  let lHalf = String(i).suffix(2).reversed()
  if String(fHalf) == String(lHalf) {
    ans += 1
  }
}
print(ans)
//  [swift]
import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
func exponentiate(_ lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
//extension Array where Element == String {
//    func joined(separator separator: String) -> String {
//        return self.joinWithSeparator(separator)
//    }
//}
extension Array where Element: Comparable {
    func max() -> Element {
        return self.maxElement()!
    }
    func min() -> Element {
        return self.minElement()!
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
func exponentiate(lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/

//var min, min2, count: Int!
//for i in 1...10 {
//    let x = Int(readLine()!)!
//    if i == 1 {
//        min = x
//        count = 1
//    } else if x < min {
//        min2 = min
//        min = x
//        count = 1
//    } else if x == min && count == 1 {
//        min2 = x
//        count = 2
//    }
//}
//print(min2)

/*************** メインプログラム ***************/

let input = readIntSplit(by: " ")
let (A, B) = (input[0], input[1])
var ans = 0
for i in A...B {
    if String(i).toArray() == String(i).toArray().reversed() {
        ans += 1
    }
}
print(ans)
//  [typescript]
var lines: string[] = [];
var reader: any = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on("line", function(line: string) {
  lines.push(line);
});

reader.on("close", function() {
  var strA: string = lines[0].split(" ")[0];
  var strB: string = lines[0].split(" ")[1];
  var numA: number = Number(strA);
  var numB: number = Number(strB);
  var result = 0;
  for (var i = numA; i <= numB; i++) {
    if (
      Math.floor(i / 10000) == i % 10 &&
      Math.floor(i / 1000) % 10 == Math.floor((i % 100) / 10)
    ) {
      result++;
    }
  }
  console.log(result);
});
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);const tn=():number=>{const a=input[0];input.shift();return Number(a)};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{const a=input[0];input.shift();return String(a)};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const tc=():string=>{let a=input[0].split('');const b=a[0];a.shift();if(a.length>0){input[0]=a.join('')}else{input.shift()}return String(b)};const tcc=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(tc())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1];}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const objvs =(a)=>{const b=[];for(const v in a){b.push(a[v])}return b};
const main=()=>{
  let [a,b]=tnn(2),c=0
  for(let i=a;i<=b;i++){
    let s=String(i)
    if(s[0]==s[4]&&s[1]==s[3])c++
  }
  to(c)
}
main()
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const toPalindromicNumber = (target: number) => {
  const nums = target.toString().split("");

  return Number(
    `${nums.slice(0, 3).join("")}${nums.slice(0, 2).reverse().join("")}`
  );
};

const main = (input: string[][]) => {
  const [A, B] = input[0].map(Number);

  let answer = Math.floor(B / 100) - Math.floor(A / 100) - 1;

  if (A <= toPalindromicNumber(A)) {
    answer += 1;
  }
  if (B >= toPalindromicNumber(B)) {
    answer += 1;
  }

  return answer;
};

console.log(main(read()));
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8').trim()

const [a, b] = stdin
  .split('\n')[0]
  .split(' ')
  .map(Number)

const isPalindromic = num => {
  const stNum = String(num)
  const revStNum = stNum
    .split('')
    .reverse()
    .join('')

  return stNum === revStNum
}

const ans = () => {
  let count = 0
  for (let i = a; i <= b; i++) {
    count += isPalindromic(i) ? 1 : 0
  }

  console.log(count)
}

ans()
//  [typescript]
import * as fs from "fs";
const input = (fs.readFileSync("/dev/stdin", "utf8") as string).split(/\s/);
let cnt = 0;
for (
  let index = parseInt(input[0], 10);
  index <= parseInt(input[1], 10);
  index++
) {
  let s = index.toString();
  let n = s.split("").reverse().join("");
  if (s === n) cnt++;
}
console.log(cnt);
//  [typescript]
"use strict";
const Main = (input) =>{
   let xs = input.trim().split(' ').map(v=>parseInt(v,10));
   let A = xs[0];
   let B = xs[1];
   let count = 0;
   
   for(let i=A; i<=B; i++){
     let ans1 = i.toString();
     let ans2 = ans1.split('').reverse().join('');
     
     if(ans1==ans2){
       count++;
     }
   }
   console.log(count);
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [python]
from bisect import *
from collections import *
from itertools import *
import functools
import sys
import math
from decimal import *
from copy import *
from heapq import *
from fractions import *
getcontext().prec = 30
MAX = sys.maxsize
MAXN = 10000001
MOD = 10**9+7
spf = [i for i in range(MAXN)]
spf[0]=spf[1] = -1
def sieve():
    for i in range(2,MAXN,2):
        spf[i] = 2
    for i in range(3,int(MAXN**0.5)+1):
        if spf[i]==i:
            for j in range(i*i,MAXN,i):
                if spf[j]==j:
                    spf[j]=i
def fib(n,m):
    if n == 0:
        return [0, 1]
    else:
        a, b = fib(n // 2)
        c = ((a%m) * ((b%m) * 2 - (a%m)))%m
        d = ((a%m) * (a%m))%m + ((b)%m * (b)%m)%m
        if n % 2 == 0:
            return [c, d]
        else:
            return [d, c + d]

def charIN(x= ' '):
    return(sys.stdin.readline().strip().split(x))

def arrIN(x = ' '):
    return list(map(int,sys.stdin.readline().strip().split(x)))

def ncr(n,r):
    num=den=1
    for i in range(r):
        num = (num*(n-i))%MOD
        den = (den*(i+1))%MOD

    return (num*(pow(den,MOD-2,MOD)))%MOD

def flush():
    return sys.stdout.flush()

'''*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*'''
a,b,k = arrIN()
if a>=k:
    a-=k
    print(a,b)
    exit(0)
k-=a
a = 0
b-=min(b,k)
print(a,b)
//  [python]
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    A, B, K = map(int, readline().split())

    if K < A:
        print(A - K, B)
    elif K < A + B:
        print(0, A + B - K)
    else:
        print(0, 0)

    return


if __name__ == '__main__':
    main()
//  [python]
from sys import stdin
import numpy as np


# noinspection PyShadowingBuiltinsInspection

def main():
    a, b, k = [int(x) for x in input().split()]
    if a >= k:
        print(a-k, b)
    elif a + b >= k:
        print(0, a + b - k)
    else:
        print(0,0)
    return


if __name__ == "__main__":
    main()
//  [java]
import java.util.*;
 public class Main {
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);

      long A = sc.nextLong();
      long B = sc.nextLong();
      long K = sc.nextLong();

      if(A >= K){
        A -= K;
       

      }else if(A + B >= K){
        K -= A;
        A = 0;
        B -= K;
      

      }else{
        A = 0;B = 0;
       
      }
        System.out.println(A + " " + B);
   }
 }
//  [java]
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		long a = scan.nextLong();
		long b = scan.nextLong();
		long k = scan.nextLong();

		if(k >= a) {
			k -= a;
			a = 0;
		}else {
			a -= k;
			k = 0;
		}

		if(k >= b) {
			b = 0;
		}else {
			b -= k;
		}

		System.out.println("" + a + " " + b);
	}
}
//  [cpp]
#include <iostream>
#include <array>
#include <algorithm>
#include <map>
#include <vector>
#include <cmath>
#include <list>
#include <cmath>
#include <stack>
#include <queue>

#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using namespace std;

const int mod = 1000000007;
struct mint {
	ll x; // typedef long long ll;
	mint(ll x = 0) :x((x% mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}

	// for prime mod
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint a) const {
		mint res(*this);
		return res /= a;
	}
};

struct combination {
	vector<mint> fact, ifact;
	combination(int n) :fact(n + 1), ifact(n + 1) {
		fact[0] = 1;
		for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i;
		ifact[n] = fact[n].inv();
		for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i;
	}
	mint operator()(int n, int k) {
		if (k < 0 || k > n) return 0;
		return fact[n] * ifact[k] * ifact[n - k];
	}
} comb(2000005);

mint g(int r, int c) {
	return comb(r + c + 2, r + 1) - 1;
}

int main()
{
	long long a, b, k;
	cin >> a >> b >> k;
	long long minA = min(a, k);
	k -= minA;
	a -= minA;
	if (k > 0)
	{
		long long minB = min(b, k);
		//青木くんのクッキーを食べる
		k -= minB;
		b -= minB;
	}
	cout << a << " " << b;
}
//  [cpp]
#include<bits/stdc++.h>
#define ll long long
#define mp make_pair
#define F first
#define S second
#define db double
#define pb push_back
#define rep(i,a,b)  for(ll i=a;i<=b;i++)
using namespace std;
 
 ll mod=1e9 +7;
 
ll expo(ll base,ll exponent,ll mod){
    ll ans=1;
    while(exponent!=0){
        if(exponent&1) ans=(1LL*ans*base)%mod;
        base=(1LL*base*base)%mod;
        exponent>>=1;
    }
    return ans%mod;
}
 
vector<bool>  prime(90000002,true);
void Sieve() 
{ 
   
    for (int p=2; p*p<=90000001; p++) 
    { 
        // If prime[p] is not changed, then it is a prime 
        if (prime[p] == true) 
        { 
            for (int i=p*p; i<=90000001; i += p) 
                prime[i] = false; 
        } 
    } 
}

const ll M=200006;
ll f[M],inv[M];

void compute(){
    f[0]=1;
    rep(i,1,M-1){
        f[i]=(1LL*i*f[i-1])%mod;
    }
    inv[M-1]=expo(f[M-1],mod-2,mod);
    for(ll i=M-2;i>=0;i--){
        inv[i]=(1LL*(i+1)*inv[i+1])%mod;
    }
}
ll C(ll n,ll r){
    return (1LL*((1LL*f[n]*inv[r])%mod)*inv[n-r])%mod;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    // compute();
    // Sieve();
    ll tests=1;
    // cin>>tests;
    while(tests--)
    {
     ll a,b,k;
     cin>>a>>b>>k;
     if(k>=a)
     {
      k-=a;
      a=0;
      b-=k;
      b=max(b,0LL);
     }
     else
     {
      a-=k;
     }
     cout<<a<<" "<<b;

    }
    return 0;
   }
//  [c]
#include<stdio.h>
void main()
{
  long int a,b,k;
  scanf("%ld %ld %ld",&a,&b,&k);
  if(a<=k&&k<a+b)
  {
  
    printf("%d %ld",0,b+a-k);
  }
  if(a>k)
  { 
    printf("%ld %ld",a-k,b);
  }
  if(k>=a+b)
  {
    printf("%d %d",0,0);
  }
}
//  [c]
#include <stdio.h>
int main(){
   long int a, b, k;
   scanf("%ld %ld %ld", &a, &b, &k);

   if( a-k < 0 ){
      if( (a+b)-k < 0 ){
         a=0;
         b=0;
      }else{
         b-=(k-a);
         a=0;
      }
   }else{
      a-=k;
   }
   printf("%ld %ld\n", a, b);
   return 0;
}
//  [c]
#include<stdio.h>
int main(void){
   long A,B,K;
   scanf("%ld %ld %ld",&A,&B,&K);
   if(A>=K){
      A -=K;
   } else if(A+B<K) {
      A=0;
      B=0;
   } else {
      B -=K;
      B +=A;
      A=0;
   }
   printf("%ld %ld",A,B);
   return 0;
}
//  [javascript]
function Main(input) {
  input = input.trim()
  input = input.split(" ").map(Number);
  if(input[0]<input[2]){
  input[1] -= (input[2]-input[0]);
  input[0] = 0;
  }else{
  input[0] -= input[2];
  }
  if(input[1]<0) input[1]=0;
  console.log(input[0]+" "+input[1]);
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split("\n");
     abk  = input[0].split(" ");
	//文字列から10進数に変換するときはparseIntを使います
	var a = parseInt(abk[0], 10);
    var b = parseInt(abk[1], 10);
    var k = parseInt(abk[2], 10);
   
   if(a<=k){var ak=k-a;
           var  a=0;
          // console.log(ak,b);
            if(b<=ak){var b=0;}
                      else{var b = b-ak;}
            }
            else{var a = a-k;}
            
 console.log(a,b); 
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
"use strict"
function main(arg) {
    var data = arg.split("\n")[0].split(" ").map(Number)
    var k = data[2]
    var a = data[0]
    var b = data[1]
    if (a >= k) {
        a = a - k
        console.log(a + " " + b)
        return
    } else {
        k = k - a
        a = 0
        if (b >= k) {
            b = b - k
            console.log(a + " " + b)
            return 
        } else {
            console.log(0 + " " + 0)
            return
        }
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import (
	"bufio"
	"bytes"
	"encoding/binary"
	"fmt"
	"os"
)

var rdr = bufio.NewReaderSize(os.Stdin, 10000000)

func readInt() int {
	buf := make([]byte, 0, 10000000)
	for {
		l, p, err := rdr.ReadLine()
		if err != nil {
			panic(err)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	B := bytes.NewReader(buf)
	var i int
	err := binary.Read(B, binary.LittleEndian, &i)
	if err != nil {
		panic(err)
	}
	return i
}

func main() {
	var A, B, K int
	fmt.Scan(&A, &B, &K)

	func() {
		if A > K {
			fmt.Printf("%d %d\n", A-K, B)
			return
		}

		K = K - A
		if B > K {
			fmt.Printf("%d %d\n", 0, B-K)
			return
		}
		fmt.Println("0 0")
		return
	}()

}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var a, b, k int
	fmt.Scanf("%d %d %d", &a, &b, &k)

	if a < k {
		if b < (k - a) {
			b = 0
		} else {
			b = b - (k - a)
		}
		a = 0
	} else {
		a = a - k
	}

	fmt.Printf("%d %d", a, b)
}
//  [ruby]
a, b , k = gets.chomp.split(" ").map(&:to_i)
kizyun = a + b 
if a >= k
    aa = a - k
    bb = b
elsif kizyun >= k && k >= a
    aa = 0
    bb = a + b - k
else
    aa = 0
    bb = 0
end
print aa
print " "
print bb
print "\n"
//  [ruby]
a,b,c=gets.split.map(&:to_i)
if a<c
  c-=a
  a=0
  if b<c
    b=0
  else
    b-=c
  end
else
  a-=c
end
puts [a,b].join ' '
//  [ruby]
a, b, k = gets.split.map(&:to_i)

a2 = [0, a - k].max
k = k - a
if k > 0
    b = [0, b - k].max
end
puts a2.to_s + ' ' + b.to_s
//  [rust]
#![allow(non_snake_case)]
#![allow(unused_imports)]
use proconio::input;
use std::cmp::max;
use std::cmp::min;
use std::collections::HashMap;
use std::collections::VecDeque;

fn main() {
    input! {
        mut A: i64,
        mut B: i64,
        mut K: i64,
    }

    if K <= A {
        A -= K;

        println!("{}", A);
        println!("{}", B);
        return;
    }

    K -= A;
    A = 0;
    B -= K;
    B = max(0, B);

    println!("{}", A);
    println!("{}", B);
}
//  [rust]
use proconio::{fastout, input};
#[allow(unused_mut)]
#[fastout]
fn main() {
    input! {
        a: usize,
        b: usize,
        k: usize
    }
    if k <= a {
        println!("{} {}", a - k, b);
    } else if k <= a + b {
        println!("{} {}", 0, a + b - k);
    } else {
        println!("0 0")
    }
}
//  [typescript]
function max(a, b) {
  if (a < b) return b
  return a
}

const main = (input) => {
  const [a, b, k] = input.trim().split(' ').map(n => Number(n))
  let taka = a;
  let aoki = b;
  if (a <= k) {
    taka = 0
    aoki = max(b-(k-a), 0)
  } else {
    taka = a - k
  }
  console.log(taka + ' ' + aoki)
  
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [typescript]
function Main(input) {
    const line = input.split("\n")[0].split(" ");
    let A = parseInt(line[0]);
    let B = parseInt(line[1]);
    let K = parseInt(line[2]);
    
    if(A>=K){
        A -= K;
    } else {
        K -= A;
        A = 0;
        B = B>=K ? B-K : 0;
    }

    console.log(A+" "+B);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]

function Main(input: string) {
    let splited = input.split('\n')[0];
    let A = parseInt(splited.split(' ')[0]);
    let B = parseInt(splited.split(' ')[1]);
    let K = parseInt(splited.split(' ')[2]);

    if (K >= A + B) {
        console.log('0 0');
    } else {
        if (K >= A) {
            console.log('0 ' + (B - (K - A)));
        } else {
            console.log(A - K + ' ' + B);
        }
    }

}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [python]
s = list(input())
abc = ["a", "b", "c", "d", "e", "f","g" , "h", "i", "j", "k", "l","m", "n" ,"o" ,"p" ,"q" ,"r" ,"s", "t", "u", "v", "w", "x", "y", "z"]
for i in range(len(s)):
    if s[0] in abc:
        abc.remove(s.pop(0))
    else:
        s.pop(0)
if len(abc) == 0:
    print("None")
else:
    print(abc[0])
//  [python]
# -*- coding: utf-8 -*-
s = list(str(input()))

alph = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
if len(set(s)) >= 26:
    print("None")
    exit()
for i in alph:
    for j in s:
        if not(i in s):
            print(i)
            exit()
//  [python]
import sys

S = input()
alphabet_code = list(range(26))

i = 0
j = 0
while i < len(S):
    while j < 26:
        if ord(S[i]) == alphabet_code[j] + 97:
            alphabet_code[j] = -1
        j += 1
    j = 0
    i += 1

while j < 26:
    if alphabet_code[j] != -1:
        print(chr(alphabet_code[j] + 97))
        sys.exit(0)
    j += 1
print("None")
//  [java]
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String alphabet = "abcdefghijklmnopqrstuvwxyz";
        for (int i = 0 ; i < s.length() ; i++) {
            char c = s.charAt(i);
            alphabet = alphabet.replace(String.valueOf(c), "");
        }
        if (alphabet.length() == 0) {
            System.out.println("None");
        } else {
            System.out.println(alphabet.charAt(0));
        }
    }

}
//  [java]
import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String ns = sc.next();
    String[] s = ns.split("");
    String[] abc = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
    for (int i = 0; i < s.length; i++) {
      for (int j = 0; j < abc.length; j++) {
        if (s[i].equals(abc[j])) {
          abc[j] = "None";
        }
      }
    }
    String ans = "None";
    for (int i = 0; i < abc.length; i++) {
      if (!abc[i].equals("None")) {
        ans = abc[i];
        break;
      }
    }
    System.out.println(ans);
  }
}
//  [java]
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {
	public static void main(String[] args) {
		new Main().solve();
		return;
	}

	private void solve() {
		// 入力
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();

		// 計算
		Map<String, Integer> map = new TreeMap<String, Integer>();
		for (String s : "abcdefghijklmnopqrstuvwxyz".split("")) {
			if (!s.equals("")) {
				map.put(s, 0);
			}
		}
		for (String s : S.split("")) {
			if (!s.equals("")) {
				map.put(s, map.get(s) + 1);
			}
		}
		String output = "None";
		for (Entry<String, Integer> entry : map.entrySet()) {
			if (entry.getValue() == 0) {
				output = entry.getKey();
				break;
			}
		}

		// 出力
		System.out.println(output);

		return;
	}
}
//  [cpp]
#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <cstdio>
#include <cstring>

using namespace std;

int main(){
  char s[100000] = "";
  int count[26] = {};
  cin >> s;
  for (int i=0;i<strlen(s);i++) {
    count[(int)s[i]-97] = 1;
  }
  for (int i=0;i<26;i++) {
    if (count[i]==0) {
      cout << (char)(i+97) << endl;
      return(0);
    }
  }
  cout << "None" << endl;
  return(0);
}
//  [cpp]
#include<iostream>
#include<vector>
#include<algorithm>
#include<string.h>
#include<complex>
#include<set>
using namespace std;
typedef long long int llint;
#define rep(i,n) for(int i=0;i<n;i++)
int main() {
	char s[100010];
	cin >> s;
	set<char> st;
	for (int i = 0;i < strlen(s);i++) {
		st.insert(s[i]);
	}
	rep(i, 26) {
		if (st.count('a' + i) == 0) {
			cout << (char)('a' + i) << endl;
			return 0;
		}
	}
	cout << "None" << endl;
	return 0;
}
//  [cpp]
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
    char a[27]="abcdefghijklmnopqrstuvwxyz";
	char s[100005];
    int ch[27]={0},i;
    while(cin>>s)
    {
    	for(i=0;i<strlen(s);i++)
        ch[s[i]-'\0'-97]++;
    for(i=0;i<26;i++)
    if(ch[i]==0){printf("%c\n",i+97);break;}
    if(i==26)cout<<"None"<<endl;
    }
    return 0;
}
//  [c]
#include<stdio.h>
#include<string.h>
int main(void) {
	char S[100001];
	scanf("%s", S);
  
	int a = 0;
	int X[200] = { 0 };
	for (int i = 0; i < strlen(S); i++) {
		a = S[i];
		X[a] = 1;
	}

	a = 0;
	for (int i = 97; i <= 122; i++) {
		if (X[i] != 1) {
			a = i;
			break;
		}
	}

	if (a == 0) {
		printf("None");
	}
	else {
	printf("%c", a);
	}
		return 0;
}
//  [c]
#include<stdio.h>
#include<string.h>

int main(){
  int i,j,k;
  
  char S[1000000];
  scanf("%s",S);
  int flg[26];
  for(i=0;i<strlen(S);i++){
    flg[(int)S[i]-97]=1;
  }
  
  for(i=0;i<26;i++){
    if(flg[i]==0){
      printf("%c\n",i+97);
      return 0;
    }
  }
  
  puts("None");
  return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define max(p,q) ((p)>(q)?(p):(q))
#define min(p,q) ((p)<(q)?(p):(q))
#define chmax(a,b) ((a)=(a)>(b)?(a):(b))
#define chmin(a,b) ((a)=(a)<(b)?(a):(b))
#define abs(p) ((p)>=(0)?(p):(-(p)))
#define MOD 1000000007
ll powll(ll a,ll b){ll r=1;rep(i,b){r*=a;}return r;}
#define swap(a,b) do{ll w=(a);(a)=(b);(b)=w;}while(0)
#define swapd(a,b) do{double w=(a);(a)=(b);(b)=w}while(0)
#define in(a) scanf("%lld", &(a))
#define in2(a,b) scanf("%lld %lld",&(a),&(b))
#define in3(a,b,c) scanf("%lld %lld %lld",&(a),&(b),&(c))
#define ind(a) scanf("%lf", &(a))
#define ins(a) scanf("%s", (a))
#define inc(a) scanf("%c", &(a))
#define put(a) printf("%lld\n", (a))
#define putd(a) printf("%.15f\n", (a))
//      puts(a) printf("%s\n", a) 文字はこっち
//your code here!
int main(void){
    ll alph[26]={0};
    char S[100100];
    ins(S);
    rep(i, strlen(S)) alph[S[i]-'a']++;
    rep(i, 26){
        if(!alph[i]){
            putchar('a'+i);
            return 0;
        }
    }
    puts("None");
    return 0;
}
//  [javascript]
function Main(input){
    var str = 'abcdefghijklmnopqrstuvwxyz';
    var arr =[];

    for(var i = 0, len = str.length; i < len; i++){
        if(input.indexOf(str[i]) < 0){
            arr.push(str[i]);
            continue;
        }
    }
    if(arr.length === 0){
        console.log('None');
    }else{
        arr.sort();
        console.log(arr[0]);
    }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(s) {
	s = s.split("\n")[0];
	var h = new Set();
	for (var i = 97; i <= 97+25; i++) {
		h.add(String.fromCharCode(i));
	}
	for (var i = 0; i < s.length; i++) {
		if (h.has(s[i])) {h.delete(s[i]);}
	}
	console.log(h.size === 0 ? "None" : Array.from(h).sort()[0]);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
//JavaScript(Node.js) での解答例
// inputに入力データ全体が入る
function Main(input) {
    // 1行目がinput[0], 2行目がinput[1], …に入る
    input = input.split("\n");
	tmp = input[0].split(" ");
	var S = tmp[0];
	var ans = "abcdefghijklmnopqrstuvwxyz";
	while (S.length !== 0) {
		var regExp = new RegExp(S[0],"g");
		S = S.replace(regExp, "");
		ans = ans.replace(regExp, "");
	}
	if (ans.length === 0) {
		console.log("None");
	} else {
		console.log(ans[0]);
	}
	//出力
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import "fmt"

func main() {
	var s string
	fmt.Scan(&s)
	
	for i := 'a'; i <= 'z'; i++ {
		has := false
		for j := 0; j < len(s); j++ {
        	if string(i) == string(s[j]) {
				has = true
            	continue
			}
		
		}
		if !has {
        	fmt.Println(string(i))
        	return
		}
	}
	fmt.Println("None")
}
//  [go]
package main

import "fmt"

func main() {
	var s string
	fmt.Scan(&s)
	
	for i := 'a'; i <= 'z'; i++ {
		has := false
		for j := 0; j < len(s); j++ {
        	if string(i) == string(s[j]) {
				has = true
			}
		
		}
		if !has {
        	fmt.Println(string(i))
        	return
		}
	}
	fmt.Println("None")
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	// Code for B - Not Found
	var S string
	fmt.Scanf("%s", &S)

	ans := make(map[string]int, len(S))
	for i := 0; i < len(S); i++ {
		ans[string(S[i])]++
	}

	for i := 0; i < 26; i++ {
		char := string('a' + i)
		if ans[char] == 0 {
			fmt.Println(char)
			break
		}
		if i == 25 {
			fmt.Println("None")
		}
	}

}
//  [ruby]
# AtCoder Beiginner Contest 071B

index = 0

flag = Array.new(26,false)

string = gets.chomp
#puts string

array = ('a'..'z').to_a
#puts array

string.length.times do |i|
        index = 0
        26.times do |k|
                index = index + 1
                if string[i] == array[k]
                        #print array[k],index
                        flag[k] = true
                end
        end
end

26.times do |k|
        if flag[k] == false
                puts array[k]
                break
        end
end

puts "None"      if flag.all?
//  [ruby]
inputString = gets.chomp()
inputStringLength = inputString.length

answeredFlag = 0

("a".."z").each do |i|
  flag = 0
  answerString = ""
  inputStringLength.times do | j |
    if inputString[j] == i
      flag = 1
    end
  end
  if flag == 0
    print i
    answeredFlag = 1
    break
  end
end

if answeredFlag == 0
  print "None"
end
//  [ruby]
array=gets.split("")
a=('a'..'z').to_a
i=0

26.times{

if array.count(a[i])==0 then
  puts a[i] 
  break
else
  array.delete(a[i])
end

i+=1
}

if i==26
puts ("None")
end
//  [rust]
#[macro_use]
mod input {

use std;
use std::io;

const SPLIT_DELIMITER: char = ' ';

#[macro_export]
#[allow(unused_macros)]
macro_rules! input {
    ( $($x:expr ),*) => {
        {
            let temp_str = input_line_str();
            let mut split_result_iter = temp_str.split_whitespace();
                $(
                let buf_split_result = split_result_iter.next();
                let buf_split_result = buf_split_result.unwrap();
                    ($x) = buf_split_result.parse().unwrap();
                )*
        }
    };
}

#[allow(dead_code)]
pub fn input_line_str() -> String {
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    s.trim().to_string()
}

#[allow(dead_code)]
pub fn p<T>(t: T)
where
    T: std::fmt::Display,
{
    println!("{}", t);
}

#[allow(dead_code)]
pub fn input_vector2d<T>(line: usize) -> Vec<Vec<T>>
where
    T: std::str::FromStr,
{
    let mut v: Vec<Vec<T>> = Vec::new();

    for _ in 0..line {
        let vec_line = input_vector();
        v.push(vec_line);
    }
    v
}

#[allow(dead_code)]
pub fn input_vector<T>() -> Vec<T>
where
    T: std::str::FromStr,
{
    let mut v: Vec<T> = Vec::new();

    let s = input_line_str();
    let split_result = s.split(SPLIT_DELIMITER);
    for z in split_result {
        let buf = match z.parse() {
            Ok(r) => r,
            Err(_) => panic!("Parse Error"),
        };
        v.push(buf);
    }
    v
}

#[allow(dead_code)]
pub fn str2vec(s: &str) -> Vec<char> {
    let mut v: Vec<char> = Vec::new();
    for c in s.chars() {
        v.push(c);
    }
    v
}

}

use input::*;
use std::collections::BTreeSet;

fn main() {
    let s = str2vec(&input_line_str());
    let mut map = "abcdefghijklmnopqrstuvwxyz"
        .chars()
        .into_iter()
        .collect::<BTreeSet<_>>();

    for z in s {
        let mut map2 = BTreeSet::new();
        map2.insert(z);
        map = &map - &map2;
    }
    let mut it = map.iter();
    let ans = match it.next() {
        None => String::from("None"),
        Some(e) => e.to_string(),
    };
    p(ans);
}
//  [rust]
use std::io;

fn gets() -> String {
    let mut buf = String::new();
    io::stdin().read_line(&mut buf).ok();
    return buf
}

fn main() {
  let line = gets();
  let mut s: Vec<&str> = line.trim().split("").collect();
  s.sort();
  s.dedup();
  s.remove(0);
  let mut done = false;
  for (i, x) in (97..123).enumerate() {
    let xx = x as u8;
    let a = xx as char;
    if (i > s.len() - 1) || (a.to_string() != s[i]) {
      println!("{}", a);
      done = true;
      break;
    }
  }
  if !done {
    println!("None");
  }
}
//  [rust]
use std::io::*;
use std::io;
use std::str::FromStr;
fn read(s: &mut StdinLock) -> u32 {
    s.by_ref()
        .bytes()
        .map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .fold(0, |a, x| (x as u8 - b'0') as u32 + a * 10)
}

fn main() {
    let stdin = io::stdin();

    let mut buf = String::new();
    stdin.read_line(&mut buf).ok();

    let mut it = buf.split_whitespace().map(|n| String::from_str(n).unwrap());
    let s = it.next().unwrap();
    let mut s: Vec<&str> = s.trim().split("").collect();
    s.sort();
    s.dedup();
    s.remove(0);
    //    let a = "abcdefghijklmnopqrstuvwxyz".to_string();

    let mut x: [u8; 27] = [0; 27];
    for i in 0..s.len() {
        let tmp = s[i].to_string().chars().nth(0).unwrap() as u8 - 'a' as u8;
        x[tmp as usize] += 1;
    }

    for i in 0..26 {
        if x[i] == 0 {
            println!("{}", (i as u8 + 'a' as u8) as char);
            return;
        }
    }
    println!("None");

}
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{const t=[...ar];return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{const t=[...ar];return t.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a:any[]):any[]=>{return Array.from(new Set(a))}
const main=()=>{
  let s=ts().split('').sort()
  if(s[0]!='a'){
    to('a')
    return
  }
  for(let i=1;i<s.length-1;i++){
    if(s[i+1].charCodeAt(0)-s[i].charCodeAt(0)>1){
      to(String.fromCharCode(s[i].charCodeAt(0)+1))
      return
    }
  }
  if(s[s.length-1]!='z'){
    to(String.fromCharCode(s[s.length-1].charCodeAt(0)+1))
    return
  }
  to('None')
}
main()
//  [typescript]
const log = console.log;

// ----

function Main(input: string): void {
  const characters = input
    .trim()
    .split("")
    .sort();

  const len = characters.length;
  let previousCode = "a".charCodeAt(0) - 1;

  for (let i = 0; i < len; i++) {
    const currentCode = characters[i].charCodeAt(0);

    if (currentCode - previousCode > 1) {
      log(String.fromCharCode(previousCode + 1));

      return;
    }

    previousCode = currentCode;
  }

  const lastCharCode = characters[len - 1];
  log(
    lastCharCode === "z"
      ? "None"
      : String.fromCharCode(lastCharCode.charCodeAt(0) + 1)
  );
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
"use strict";

main(require("fs").readFileSync("/dev/stdin", "utf8"));

function main(input) {
  const s = new Set(input.split(""));

  const alphabet = {};
  "abcdefghijklmnopqrstuvwxyz".split("").forEach(c => alphabet[c] = true);

  s.forEach(c => alphabet[c] = false);

  const char = Object.keys(alphabet).find(c => alphabet[c]);

  const ans = char === undefined ? 'None' : char;
  console.log(ans);
}
//  [python]
n,*l=map(int,open(0).read().split())
from heapq import *
heapify(l)
while len(l)>1:
  heappush(l,heappop(l)*heappop(l))
print([l[0],-1][l[0]>10**18])
//  [python]
n,*l=map(int,open(0).read().split())
from heapq import*;p=heappop;heapify(l)
while len(l)>1:heappush(l,p(l)*p(l))
print([l[0],-1][l[0]>10**18])
//  [python]
n,*l=map(int,open(0).read().split())
from heapq import*
p=heappop
heapify(l)
while len(l)>1: heappush(l,p(l)*p(l))
print([l[0],-1][l[0]>10**18])
//  [java]
import java.math.BigDecimal;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int a = sc.nextInt();
       	BigDecimal b = new BigDecimal("0");
        BigDecimal c = new BigDecimal("0");

    	for (int i = 0; i < a; i++) {
          	if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            }
        }

      	if (b.compareTo(new BigDecimal("1000000000000000000")) > 0) {
          System.out.println(-1);
        } else {
          System.out.println(b);
        }
	}
}
//  [java]
import java.math.BigDecimal;
import java.util.Scanner;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        BigDecimal[] a = new BigDecimal[n];
 
        BigDecimal result = new BigDecimal(1);
        BigDecimal max = new BigDecimal(1000000000000000000L);
        for(int i=0; i < n; i++){
            a[i] = sc.nextBigDecimal();
            if(a[i].compareTo(BigDecimal.ZERO) == 0) {
                System.out.println(0);
                return;
            }
        }
 
        for(int i=0; i < n; i++){
            result = result.multiply(a[i]);
            if(result.compareTo(max) > 0){
                System.out.println(-1);
                return;
            }
        }
 
        System.out.println(result);
    }
}
//  [java]
import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.util.*;

public class Main
{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        BigDecimal base = new BigDecimal(1);
        BigDecimal mm = new BigDecimal(Math.pow(10,18));

        List<BigDecimal> list = new ArrayList<>();
        BigDecimal zero = new BigDecimal(0);
        for (int i = 0;i<n;++i)
        {
            BigDecimal a = sc.nextBigDecimal();
            if (a.equals(zero))
            {
                System.out.println(0);
                System.exit(0);
            }
            list.add(a);
        }

        for (BigDecimal a:list)
        {
            base = base.multiply(a);
            if (base.compareTo(mm) > 0)
            {
                base = new BigDecimal(-1);
                break;
            }
        }

        System.out.println(base);
        sc.close();
    }
}