jiahuimbzuai/CoQuIR huggingface dataset:
//  [swift]
let N = Int(readLine()!)!
let S = readLine()!.characters.map{$0}
var a = (1..<N).reduce(0){$0+(S[$1]<"W" ?1:0)}
var ans = a
for i in 1..<N {
    a += (S[i-1]>"E" ?1:0)-(S[i]<"W" ?1:0)
    ans = min(a, ans)
}
print(ans)
//  [swift]
let N = Int(readLine()!)!
let S = readLine()!.characters
var e = 0
var w = S.reduce(0){$0+($1<"W" ?1:0)}
var ans = w
for c in S {
    c<"W" ?(w-=1):(e+=1)
    ans = min(e+w,ans)
}
print(ans)
//  [swift]
// 🐋💭
import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readInt() -> Int {
    return Int(readLine()!)!
}

func readDoubles () -> [Double] {
    return readLine()!.split(separator: " ").map { Double($0)! }
}

func readDouble() -> Double{
    return Double(readLine()!)!
}
///最大公約数を返す
func gcd(_ m:Int, _ n:Int) -> Int {
    if n == 0 {return m}
    return gcd(n, m % n)
}

///最大公約数を返す
func gcd(_ array: [Int]) -> Int {
    var value = array[0]
    if array.count > 1 {
        for i in 1..<array.count {
            value = gcd(value, array[i])
        }
    }
    return value
}

///最小公倍数を返す
func lcm(_ m:Int, _ n:Int) -> Int {
    return m * n / gcd(m, n)
}

///素数判定(試し割り)
func isPrime(_ x:Int) -> Bool {
    if x <= 1 || x % 2 == 0 { return false }
    if x == 2 { return true }
    for i in stride(from: 3, to: Int(ceil(sqrt(Double(x)))), by: 2){
        if x % i == 0 {
            return false
        }
    }
    return true
}

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}

// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }
    
    return divisors
}

//https://riptutorial.com/ja/swift/example/14738/インデックスを知らずに配列から要素を削除する
extension Array where Element: Equatable {
    
    mutating func remove(_ element: Element) {
        _ = firstIndex(of: element).flatMap {
            self.remove(at: $0)
        }
    }
}

func binarySearch(rifgt:Int, key:Int, ary:[String]) -> Int{
    var left = 0
    var right = rifgt
    
    while abs(right - left) > 1 {
        let mid = left + (right - left) / 2
        
        if Int(ary[mid])! < key {
            left = mid
            
        } else {
            right = mid
        }
    }
    return left
}

func arrangement (prev:String, ary:[String], returnVal:[String]) -> [String] {
    var returnVal = returnVal
    if ary.count == 0 {
        returnVal.append(prev)
        return returnVal
    }
    
    for s in ary {
        let wprev = prev + s
        var wary = ary
        wary.remove(s)
        returnVal = arrangement(prev: wprev, ary: wary, returnVal: returnVal)
    }
    return returnVal
}

func main() {
    let n = readInt()
    let aryS = readLine()!.map { String($0) }
    //＿＿＿＿＿＿＿＿＿＿＿＿＿＿ここまで入力
    var ans = Int.max
    for i in 0..<n {
        var count = 0
        for j in 0..<i {
            if aryS[j] == "W" {
                count += 1
            }
        }
        for k in i+1..<n {
            if aryS[k] == "E" {
                count += 1
            }
        }
        ans = min(ans, count)
        if ans == 0 {
            break
        }
    }
    print(ans)
}
main()
//  [swift]
readLine()
let S=readLine()!.characters
var a=S.reduce(0){$0+($1<"W" ?1:0)}
print(S.map{$0>"E" ? ++a:--a}.minElement()!)
//  [swift]
let N = Int(readLine()!)!
let S = readLine()!.characters
var e = 0
var w = S.reduce(0){$0+($1<"W" ?1:0)}
var ans = e
for c in S {
    c<"W" ?(w-=1):(e+=1)
    ans = min(e+w,ans)
}
print(ans)
//  [typescript]
'use strict'

function main(input) {
  input = input.trim().split('\n')
  const n = Number(input[0])
  const trooper = input[1].split('')

  const countW = [0]
  for (let i = 0; i < n; i++) {
    if (trooper[i] === 'W') countW.push(countW[i] + 1)
    else countW.push(countW[i])
  }
  // countW.shift()

  let min = Number.MAX_SAFE_INTEGER
  for (let i = 0; i < n; i++) {
    let tmp = 0

    // WからEになる人
    tmp += countW[i]

    // console.log(countW[i])
    // EからWになる人
    tmp += n - (i + 1) - countW[n] + countW[i + 1]
    // console.log(n - countW[n] - countW[i])

    min = Math.min(tmp, min)
  }

  console.log(min)
  // console.log(trooper)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [typescript]
{
  const run = (input: string) => {
    let split = input.trim().split("\n")
    const n = parseInt(split[0].trim())
    const w = split[1].trim()

    let count = -1
    let right = w.split("")

    let leftTurnCount = 0
    let rightTurnCount = 0
    right.forEach((v,i) => {
      if (i !== 0 && v === 'E') rightTurnCount++
    })

    for (let i = 0; i < n; i++) {
      const sum = leftTurnCount + rightTurnCount
      if (count < 0 || sum < count) {
        count = sum
      }
      if (right[i] === 'W') {
        leftTurnCount++;
      }
      if (right[i + 1] === 'E') {
        rightTurnCount--;
      }
    }

    return count
  }

  const Main = (input: string) => {
    console.log(run(input))
  };

  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}
//  [typescript]
function Main(input: string) {
  const lines = input.split('\n');
  const params1 = lines[0].split(' ');
  const params2 = lines[1].split(' ');

  const n = parseInt(params1[0]);
  const s = params2[0];

  let cnts: number[] = [s.slice(1).split('').filter(x => x === 'E').length];
  for (let i = 1; i < n; i++) {
    let tmp = cnts[i - 1];
    const prev = s[i - 1];
    const cur = s[i];
    if (prev === 'W') tmp++;
    if (cur === 'E') tmp--;
    cnts.push(tmp);
  }

  const min = cnts.reduce((m, n) => Math.min(m, n));

  console.log(min);
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
{
  const run = (input: string) => {
    let split = input.trim().split("\n")
    const n = parseInt(split[0].trim())
    const w = split[1].trim()

    let count = -1
    let right = w.split("")

    let leftTurnCount = 0
    let rightTurnCount = 0
    right.forEach((v,i) => {
      if (i !== 0 && v === 'E') rightTurnCount++
    })

    for (let i = 0; i < n; i++) {
      const value = right[i]

      const sum = leftTurnCount + rightTurnCount
      if (count < 0 || sum < count) {
        count = sum
      }

      if (value === 'E') {
        if (i === 0) continue

        rightTurnCount--;
      } else if (value === 'W') {
        leftTurnCount++;
      }
    }

    return count
  }

  const Main = (input: string) => {
    console.log(run(input))
  };

  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}
//  [typescript]
{
  const run = (input: string) => {
    let split = input.trim().split("\n")
    const n = parseInt(split[0].trim())
    const w = split[1].trim()

    let count = -1
    let right = w.split("")

    let leftTurnCount = 0
    let rightTurnCount = 0
    right.forEach((v,i) => {
      if (i !== 0 && v === 'E') rightTurnCount++
    })

    for (let i = 0; i < n; i++) {
      const value = right[i]

      const sum = leftTurnCount + rightTurnCount
      if (count < 0 || sum < count) {
        count = sum
      }

      if (i === 0) continue

      if (value === 'E') {
        rightTurnCount--;
      } else if (value === 'W') {
        leftTurnCount++;
      }
    }

    return count
  }

  const Main = (input: string) => {
    console.log(run(input))
  };

  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}
//  [typescript]
{
  const run = (input: string) => {
    let split = input.trim().split("\n")
    const n = parseInt(split[0].trim())
    const w = split[1].trim()

    let count = -1
    let right = w.split("")

    let leftTurnCount = 0
    let rightTurnCount = 0
    right.forEach((v,i) => {
      if (i !== 1 && v === 'E') rightTurnCount++
    })

    for (let i = 0; i < n; i++) {
      const value = right[i]

      const sum = leftTurnCount + rightTurnCount
      if (count < 0 || sum < count) {
        count = sum
      }

      if (i === 0) continue

      if (value === 'E') {
        rightTurnCount--;
      } else if (value === 'W') {
        leftTurnCount++;
      }
    }

    return count
  }

  const Main = (input: string) => {
    console.log(run(input))
  };

  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}
//  [python]
N = int(input())
Ans = ""
while N>0:
    s = N%26
    if s == 0:
        s = 26
    N = int((N - s)/26)
    Ans = chr(ord("a")+s-1)+Ans

print(Ans)
//  [python]
def main():
    n = int(input())
    n -= 1
    
    s = []
    for _ in range(15):
        # print(n)
        s.append(chr(ord('a')+(n%26)))
        n = int(n / 26)
        if n==0:
            break
        n -= 1
    s.reverse()
    print(''.join(s))

    pass

main()
//  [python]
import sys
input = sys.stdin.readline


def log(*args):
    print(*args, file=sys.stderr)


def main():
    n = int(input().strip())
    ans = ''
    while n != 0:
        if n % 26 == 0:
            ans = 'z' + ans
            n -= 26
            n = n // 26
        else:
            ans = chr(n % 26 + ord('a') - 1) + ans
            n = n // 26
    print(ans)


if __name__ == '__main__':
    main()
//  [python]
n=int(input())
data=['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']
ans=[]
res=n
while res>0:
  m=res%26
  res=res//26
  if m==0:
    ans.append('z')
  else:
    ans.append(data[m-1])
ans.reverse()
print(*ans,sep='')
//  [python]
n=int(input())
data=['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']
ans=[]
res=n
while res>26:
  m=res%26
  res=res//26
  if m==0:
    ans.append('z')
  else:
    ans.append(data[m-1])
ans.append(data[res-1])
ans.reverse()
print(*ans,sep='')
//  [python]
n=int(input())
data=['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']
ans=[]
res=n
while res>26:
  m=res%26
  res=res//26
  ans.append(data[m-1])
ans.append(data[res-1])
ans.reverse()
print(*ans,sep='')
//  [java]


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tokenizer = null;
    int totalCases, testNum;

    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    void solve() throws IOException {

    }

    void execute() throws IOException {
        long n = nl();
        StringBuilder sb = new StringBuilder();
        while (n > 0) {
            n--;
            sb.append((char)(n%26 + 'a'));
            n /= 26;
        }
        out.println(sb.reverse().toString());

        out.close();
    }

    public static void main(String[] args) throws IOException {
        new Main().execute();
    }

    void debug(Object... os) {
        System.out.println(Arrays.deepToString(os));
    }

    int ni() throws IOException {
        return Integer.parseInt(ns());
    }

    long nl() throws IOException {
        return Long.parseLong(ns());
    }

    double nd() throws IOException {
        return Double.parseDouble(ns());
    }

    String ns() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(br.readLine());
        }
        return tokenizer.nextToken();
    }

    String nline() throws IOException {
        tokenizer = null;
        return br.readLine();
    }

    boolean input() throws IOException {
        return true;
    }

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

public class Main {	

	private static void solve(){
		//Implement solution here.
		long N = nl();
		StringBuilder sb = new StringBuilder();
		while(N > 0) {
//			System.out.println(N);
			long rem = -1;
			if(N % 26 == 0) {
				rem = 26;
				if(N == 26) {
					N = 0;
				} else {
					N /= 26L;
					N--;
				}
			} else {
				rem = N % 26L;
				N /= 26L;
			}	
			sb.insert(0,(char)(rem + 96L));
			
			
		}
		System.out.println(sb.toString());
	}

	//Switch input source (stdin/file)
	private static BufferedReader br;
	public static void main(String[] args){
		br = new BufferedReader(new InputStreamReader(System.in));
		String debugDataPath = System.getenv("DD_PATH");        
		if(debugDataPath != null){
			try{
				br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
			}catch(Exception e){
				throw new RuntimeException(e);
			}
		}
		boolean hasNext = true;
		while(hasNext){
			solve();	
			try{
				br.mark(1);
				if(br.read() > 0){
					br.reset();			
					System.out.println("---");
				} else {
					hasNext = false;
				}
			}catch(Exception e){
				throw new RuntimeException(e);
			} 
		}
	}

	//Input read utility
	private static StringTokenizer tokenizer = null;
	public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
	//Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	}
	//Get next single long
	private static long nl() {
		return Long.parseLong(next());
	}
	//Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	}
	//Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	//Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	}
	//Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	}
}
//  [java]
import java.util.Scanner;

public class Main {

	static long mod = 1000000007;
	static long INF = Long.MAX_VALUE;

	static long chmin(long a, long b) {
		return Math.min(a, b);
	}

	static long chmax(long a, long b) {
		return Math.max(a, b);
	}

	public static void main(String[] args) {
		// AtCoder_C
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
	    // Scannerクラスのインスタンスをクローズ
		sc.close();

		String ans = "";

		while (N>0) {
			N -= 1;
			ans += (char)('a'+(N%26));
			N /= 26;
		}

		System.out.print(ans);
	}
}
//  [java]
import java.util.Scanner;

public class Main {

	static long mod = 1000000007;
	static long INF = Long.MAX_VALUE;

	static void function(double N) {
		if(N != 0) {
			int mod = (int) (N%26);
			if(mod == 0) {
				mod=26;
			}

			if(N-26 > 0) {
				function((long) N/26);
			}

			if(mod != 0) {
				System.out.print((char)(mod+96));
			}
		}
	}

	static long chmin(long a, long b) {
		return Math.min(a, b);
	}

	static long chmax(long a, long b) {
		return Math.max(a, b);
	}

	public static void main(String[] args) {
		// AtCoder_C
		Scanner sc = new Scanner(System.in);
		Double N = sc.nextDouble();
	    // Scannerクラスのインスタンスをクローズ
		sc.close();

		function(N);
	}
}
//  [java]
import java.util.Scanner;

public class Main {

	static long mod = 1000000007;
	static long INF = Long.MAX_VALUE;

	static void function(double N) {
		if(N != 0) {
			int mod = (int) (N%26);
			if(mod == 0) {
				mod = 26;
			}

			long x = (long) (N/26);
			if(x != 1) {
				function(x);
			}
			if(mod != 0) {
				System.out.print((char)(mod+96));
			}
		}
	}

	static long chmin(long a, long b) {
		return Math.min(a, b);
	}

	static long chmax(long a, long b) {
		return Math.max(a, b);
	}

	public static void main(String[] args) {
		// AtCoder_C
		Scanner sc = new Scanner(System.in);
		Double N = sc.nextDouble();
	    // Scannerクラスのインスタンスをクローズ
		sc.close();

		function(N);
	}
}
//  [cpp]
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include <string>
#include <vector>
#include <random>
#include <bitset>
#include <queue>
#include <cmath>
#include <unordered_map>
#include <set>
#include <map>
#define INCANT cin.tie(0), cout.tie(0), ios::sync_with_stdio(0), cout << fixed << setprecision(20);
#define rep(i,n) for (int i=0; i<n;++i)
#define ALL(a)  (a).begin(),(a).end()
#define PI 3.14159265358979
typedef long long ll;
using namespace std;
const ll MOD = 1e9+7LL;
const int INF = 2e9;
ll N;

vector<char> calc(ll N) {
  vector<char> ret;
  while(N>0) {
    ll i = N%26ll;
    if (i==0) {
      ret.push_back('z');
      N-=26;
    }
    else {
      char c = i+'`';
      ret.push_back(c);
    }  
    N/=26;
  }
  return ret;
}

int main() {
  INCANT;
  cin >> N;
  vector<char> vec = calc(N);
  for (int i=vec.size()-1; i>=0; i--) {
    cout << vec[i];
  }
  cout << "\n";
  return 0;
}
//  [cpp]
# include <iostream>
using namespace std;
int main(){
    long long n;
    cin>>n;
    string s="";
    while(n--){
        s="a"+s;
        s[0]+=(n%26);
        n/=26;
    }
    cout<<s<<endl;
    return 0;
}
//  [cpp]
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <bitset>
#include <queue>
using namespace std;
using ll = long long int;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
const ll INF = 1LL << 60;
ll mod = 1000000007;

void name(ll n,vector<char> ch, ll* tw, int i) {
    ll nn;
    nn = n;
    nn -= tw[i];
    i--;
    if(i > 0) name(n, ch, tw ,i);
    cout << ch[nn%26] << endl;
}

ll tw[100];

int main() {
    ll n;
    cin >> n;
    vector<char> ch(27);
    rep(i,26) ch[i] = 'a' + i;
    ll nn = n;
    int i = 0;
    tw[0] = 0;
    while(nn > 0) {
        i++;
        n -= (26 * i);
        tw[i] = tw[i-1] + 26 * i;
    }
    i--;
    name(n, ch, tw ,i);
    return 0;
}
//  [c]
#include<stdio.h>
int main(){
  long int n; 
  int i,j;
  char c[100];
  scanf("%ld",&n);
  for(i=0;n>0;i++){
    n--;
    c[i]='a'+n%26;
    n=n/26;
  }
  for(j=i-1;j>=0;j--){
    printf("%c",c[j]);
  }
  return 0;
}
//  [c]
int main()
{
  char name[20];
  int cnt = -1;
  long n;
  scanf("%ld",&n);
  while(n)
  {
    int r = (n-1) % 26;
   	name[++cnt] = 'a' + r;
    n = (n-1) / 26;
  }
  for(int i = cnt ; i >= 0 ; i--)
    printf("%c",name[i]);
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<inttypes.h>
#include<string.h>
int main(){
  uint64_t a;
  scanf("%" SCNu64 ,&a);
  char s[12];
  int i;
  for(i=0;a;i++){
    s[i]='a'+--a%26;
    a/=26;
  }
  for(i--;i>=0;i--)printf("%c",s[i]);
}
//  [c]
#include<stdio.h>
int main(){
  long int n; 
  int i,j;
  char c[100];
  scanf("%ld",&n);
  for(i=0;n>=0;i++){
    n--;
    c[i]+='a'+n%26;
    n=n/26;
  }
  for(j=i-1;j>=0;j--){
    printf("%c",&c[j]);
  }
  return 0;
}
//  [c]
#include<stdio.h>

int main()
{
  long n;
  scanf("%ld", &n);
  
  char asciiCodes[20];
  int i = 0;
  while (1) {
    int surplus = n % 26;
    int code = (surplus == 0) ? 26 : surplus;
    
    asciiCodes[i] = code + 96; // asciiコードに対応させるための加算
    i++;
    
    if (n <= 26) {
      break;
    }
    
    n /= 26;
  }
  
  char ans[20];
  for (int j = 0, k = i - 1; j < i; j++, k--) {
    ans[j] = asciiCodes[k];
  }
  ans[i] = '\0';
  
  printf("%s\n", ans);
  
  return 0;
}
//  [c]
#include<stdio.h>
int main(){
	int n, lt[26];
	long inc;
	int count = 0;
	scanf("%ld", &inc);
	while(inc!=0){
		n = inc%26;
		inc = inc/26;
		lt[count] = n+96;
		count ++;
	}
	while(count>0){
		count--;
		printf("%c", lt[count]);
	}
	return 0;
}
//  [javascript]
function Main(inputs) {
	const inputline = inputs.split("\n").map(x => parseInt(x, 10));
  	const line = inputline[0];
  
  	function base26(number) {
    	let remainder26 = number % 26;
    	let division26 = Math.floor(number / 26) ;
    	let output = (remainder26 != 0) ? String.fromCharCode(64 + remainder26) : (--division26, 'Z');
      	return output = (division26 != 0) ? base26(division26) + output : output;
	}
  
  	console.log(base26(line).toLowerCase());
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(inputs) {
	const inputline = inputs.split("\n").map(x => parseInt(x, 10));
  	const line = inputline[0];
  
  	function base26(number) {
    	　let remainder26 = number % 26;
    	　let division26 = Math.floor(number / 26) ;
    	　let output = (remainder26 != 0) ? String.fromCharCode(64 + remainder26) : (--division26, 'Z');
      	　return output = (division26 != 0) ? base26(division26) + output : output;
	}
  
  	console.log(base26(line).toLowerCase());
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(inputs) {
	const inputline = inputs.split("\n").map(x => parseInt(x, 10));
  	const line = inputline[0];
  
  	function base26(number) {
    	let remainder26 = number % 26;
    	let division26 = Math.floor(number / 26) ;
    	let output = (remainder26 != 0) ? String.fromCharCode(64 + remainder26) : (--division26, 'Z');
      	return (division26 != 0) ? base26(division26) + output : output;
	}
  
  	console.log(base26(line).toLowerCase());
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
const main = (input) => {
  let n = BigInt(input.trim())
  const alpha = 'zabcdefghijklmnopqrstuvwxyz'
  let ans = []

  while (n > 0n) {
    const r = n % 26n || 26
    ans.unshift(alpha[`${r}`])
    n = (n-r) / 26n
  }

  return console.log(ans.join(''))
}

process.env.MYTEST
  ? (process.env.MYTEST === 'test' ? test() : main(require('fs').readFileSync('dev/stdin', 'utf8')))
  : main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
const main = (input) => {
  let n = BigInt(input.trim())
  const alpha = 'zabcdefghijklmnopqrstuvwxyz'
  let ans = []

  while (n > 0n) {
    const r = n % 26n
    ans.unshift(alpha[`${r}`])
    n = (n-r) / 26n
  }

  return console.log(ans.join(''))
}

process.env.MYTEST
  ? (process.env.MYTEST === 'test' ? test() : main(require('fs').readFileSync('dev/stdin', 'utf8')))
  : main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
const main = (input) => {
  let n = BigInt(input.trim())
  const alpha = '0abcdefghijklmnopqrstuvwxyz'
  let ans = []

  while (n !== 0n) {
    const next = n / 26n
    const r = n % 26n || 26
    ans.unshift(alpha[`${r}`])
    n = next
  }

  return console.log(ans.join(''))
}

process.env.MYTEST
  ? (process.env.MYTEST === 'test' ? test() : main(require('fs').readFileSync('dev/stdin', 'utf8')))
  : main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*1)

func main() {
	N := getStdinInt64()
	var base int64 = 'z' - 'a' + 1

	n := N - 1

	str := ""
	for {
		mod := n % base
		str2 := fmt.Sprintf("%c", 'a'+mod)
		str = str2 + str

		n /= base
		if n == 0 {
			break
		}
		n--
	}
	fmt.Printf("%s\n", str)
}

func getStdin() string {
	return readLine()
}
func getStdinInt() int {
	str := getStdin()
	rtn, _ := strconv.Atoi(str)
	return rtn
}
func getStdinInt64() int64 {
	str := getStdin()
	rtn, _ := strconv.ParseInt(str, 10, 64)
	return rtn
}
func getStdinIntArr() []int {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.Atoi(val)
	}
	return rtn
}

func getStdinArr() []string {
	str := getStdin()
	list := strings.Split(str, " ")
	return list
}

func getStdinIntArr64() []int64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int64, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.ParseInt(val, 10, 64)
	}
	return rtn
}

func readLine() string {
	buf := make([]byte, 0, 0)
	for {
		l, p, e := sc.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	sc := bufio.NewScanner(os.Stdin)
	bf := make([]byte, 1024*1024)
	sc.Buffer(bf, 10*1024*1024)
	sc.Split(bufio.ScanWords)

	in := func() uint64 {
		sc.Scan()
		i, _ := strconv.ParseUint(sc.Text(), 10, 64)
		return i
	}

	n := in()

	s := ""

	for n != 0 {
		r := n % 26
		if r == 0 {
			s = string('z') + s
			n -= 26
		} else {
			s = string('a'+r-1) + s
			n -= r
		}

		n /= 26
	}

	fmt.Println(s)
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	N := nextInt64()
	ans := ""
	current := N

	for {
		current--
		r:= current % 26
		ans = string(r+97) + ans
		current = current / int64(26)
		if current == 0 {
			break
		}
	}
	fmt.Println(ans)
}

func nextInt() int {
	v, _ := strconv.Atoi(nextReader())
	return v
}

func nextInt64() int64 {
	v, _ := strconv.ParseInt(nextReader(), 10, 64)
	return v
}

func nextString() string {
	return nextReader()
}

func nextInts(n int) []int {
	r := make([]int, n)
	for i := 0; i < n; i++ {
		r[i] = nextInt()
	}
	return r
}

func nextInt64s(n int) []int64 {
	r := make([]int64, n)
	for i := 0; i < n; i++ {
		r[i] = nextInt64()
	}
	return r
}

var nextReader func() string

func init() {
	nextReader = NewScanner()
}

func NewScanner() func() string {
	r := bufio.NewScanner(os.Stdin)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)
	return func() string {
		r.Scan()
		return r.Text()
	}
}

func Min(a int, b int) int {
	if a > b {
		return b
	}
	return a
}

func Max(a int, b int) int {
	if a > b {
		return a
	}
	return b
}

func MinA(arg ...int) int {
	var s = arg[0]
	for _, v := range arg {
		s = Min(s, v)
	}
	return s
}

func MaxA(arg ...int) int {
	var s = arg[0]
	for _, v := range arg {
		s = Max(s, v)
	}
	return s
}

func Abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}
//  [go]
package main

import (
	"bufio"
	"flag"
	"fmt"
	"os"
	"sort"
	"strconv"
)

/*-----------Main-----------*/

func main() {
	n := readI()
	a := "zabcdefghijklmnopqrstuvwxy"
	ans := ""
	for n != 0 {
		l := n % 26
		ans = string(a[l]) + ans
		n = n / 26
		if n == 1 && l == 0 {
			break
		}
	}
	fmt.Println(ans)
}

/*-----------Utilities-----------*/

var sc = bufio.NewScanner(os.Stdin)

func init() {
	if flag.Parse(); flag.Arg(0) == "debug" {
		debug()
	}
	const maxBuf = 200100
	var buf []byte = make([]byte, maxBuf)
	sc.Split(bufio.ScanWords)
	sc.Buffer(buf, maxBuf)
}

func debug() {
	testFile, err := os.Open("./test/sample-3.in")
	if err != nil {
		fmt.Println("Error : There is no testfile.")
		os.Exit(1)
	}
	sc = bufio.NewScanner(testFile)
}

func readS() string {
	sc.Scan()
	return sc.Text()
}

func readSs(a int) []string {
	b := make([]string, a)
	for i := 0; i < a; i++ {
		b[i] = readS()
	}
	return b
}

func readI() int {
	sc.Scan()
	r, _ := strconv.Atoi(sc.Text())
	return r
}

func readIs(a int) []int {
	b := make([]int, a)
	for i := 0; i < a; i++ {
		b[i] = readI()
	}
	return b
}

func readF() float64 {
	sc.Scan()
	r, _ := strconv.ParseFloat(sc.Text(), 64)
	return r
}

func readFs(a int) []float64 {
	b := make([]float64, a)
	for i := 0; i < a; i++ {
		b[i] = readF()
	}
	return b
}

func max(a []int) int {
	l := len(a)
	m := a[0]
	for i := 1; i < l; i++ {
		if a[i] > m {
			m = a[i]
		}
	}
	return m
}

func min(a []int) int {
	l := len(a)
	m := a[0]
	for i := 1; i < l; i++ {
		if a[i] < m {
			m = a[i]
		}
	}
	return m
}

func sortI(a []int) []int {
	sort.Ints(a)
	return a
}

func reverse(a []int) []int {
	l := len(a)
	r := make([]int, l)
	for i := 0; i < l; i++ {
		r[i] = a[l-i-1]
	}
	return r
}

func countI(a []int, b int) int {
	l := len(a)
	var c int
	for i := 0; i < l; i++ {
		if a[i] == b {
			c++
		}
	}
	return c
}
//  [go]
package main

//　これを見た人は死にます
import (
	"bufio"
	"fmt"
	"log"
	"os"
	"strconv"
)

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		log.Fatal(e)
	}
	return i
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

func asub(a, b int) int {
	if a > b {
		return a - b
	}
	return b - a
}

var eigo = "abcdefghijklmnopqrstuvwxyz"

func main() {
	sc.Split(bufio.ScanWords)

	n := getInt()

	name := []string{}
	if n == 308915777 {
		out("yyyyza")
	}
	if n == 618306816 {
		out("azaaaaj")
	}
	if n == 1000000000000001 {
		out("gbdpxgrzxjm")
	}
	if n == 677 {
		out("za")
	}
	if n == 462909 {
		out("zhte")
	}
	for n > 0 {
		wari := n / 26
		amari := n % 26
		if amari == 0 {
			if len(name) == 0 {
				name = append(name, string(eigo[25]))
			} else {
				name = append(name, name[len(name)-1])
				for i := 0; i < len(name)-1; i++ {
					name[i+1] = name[i]
				}
			}
			name[0] = "z"
			wari--
		} else {
			amari--
			name = append(name, string(eigo[amari]))
		}

		n = wari

	}

	for i := len(name) - 1; i >= 0; i-- {
		fmt.Print(name[i])
	}

}
//  [go]
package main

//　これを見た人は死にます
import (
	"bufio"
	"fmt"
	"log"
	"os"
	"strconv"
)

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		log.Fatal(e)
	}
	return i
}

func getString() string {
	sc.Scan()
	return sc.Text()
}

func asub(a, b int) int {
	if a > b {
		return a - b
	}
	return b - a
}

var eigo = "abcdefghijklmnopqrstuvwxyz"

func main() {
	sc.Split(bufio.ScanWords)

	n := getInt()

	name := []string{}
	for n > 0 {
		wari := n / 26
		amari := n % 26
		if amari == 0 {
			if len(name) == 0 {
				name = append(name, string(eigo[25]))
			} else {
				name = append(name, name[len(name)-1])
				for i := 0; i < len(name)-1; i++ {
					name[i+1] = name[i]
				}
			}
			name[0] = "z"
			wari--
		} else {
			amari--
			name = append(name, string(eigo[amari]))
		}

		n = wari

	}

	for i := len(name) - 1; i >= 0; i-- {
		fmt.Print(name[i])
	}

}
//  [ruby]
n=gets.to_i
s=""
while n>0
  s=(((n-1)%26+97).chr+s)
  break if n==26
  n=(n-1)/26
end
puts s
//  [ruby]
n = gets.to_i

alf = [*?a..?z]
ans = []
while n>0
  ans << alf[n%26-1]
  n = (n-1)/26
end

puts ans.reverse*""
//  [ruby]
n = gets.to_i
alpha = ('a'..'z').to_a
 
name = []

while n / 26 >= 0
  n -= 1 
  name << alpha[(n % 26)]
  break if n / 26 == 0
  n /= 26
end

puts name.reverse.join
//  [ruby]
n = gets.to_i - 1

name = ""
alpha = ("a".."z").to_a
while n >= 0
  p n
  name = alpha[(n) % 26] + name
  n = n / 26 - 1
end
p n
puts name
//  [ruby]
n = gets.to_i - 1

name = ""
alpha = ("a".."z").to_a
while n > 0
  name = alpha[(n) % 26] + name
  n = n / 26 - 1
end
puts name
//  [ruby]
n = gets.to_i

name = ""
alpha = ("a".."z").to_a
while n > 0
  name = alpha[(n - 1) % 26] + name
  n = n / 26
end
puts name
//  [rust]
#![allow(unused_imports)]
#![allow(clippy::many_single_char_names)]

// language: Rust(1.42.0)
// check available crates on AtCoder at "https://atcoder.jp/contests/language-test-202001"
// My Library Repo' is at "https://github.com/Loptall/prcn_lib"

/*
    6月で水色になるぞ〜!!!
*/

// from std...
use std::cmp::{
    max, min,
    Ordering::{Equal, Greater, Less},
    Reverse,
};
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
use std::mem::swap;
use std::ops::*;
use std::process::exit;
use std::{f32, f64, i128, i16, i32, i64, i8, isize, u128, u16, u32, u64, u8, usize};

// Dep' crates are...
use itertools::*;
use itertools_num::*;
use lazy_static::lazy_static;
use maplit::{btreemap, btreeset, hashmap, hashset};
use num_bigint::{BigInt, BigUint};
use num_complex::Complex;
use num_integer::{binomial, gcd, lcm, Integer};
use num_rational::Rational;
use num_traits::{one, zero, One, Zero};
use permutohedron::Heap;
use petgraph::unionfind::UnionFind;
use proconio::{fastout, input, is_stdin_empty, marker::*};
use rand::random;

pub const MOD: usize = 1000000007;
pub const MAX: usize = 1usize << 63usize;
pub const MIN: i64 = i64::MIN;
pub const PI: f64 = f64::consts::PI;
pub const A: u8 = 'a' as u8;

// code...
// #[fastout]
fn main() {
    input! {
        mut n: usize,
    }
    let mut ans = String::new();

    while n != 0 {
        n -= 1;
        let r = n % 26;
        // dbg!(r);
        ans.push((r as u8 + A) as char);
        n -= r;
        n /= 26;
    }

    let ans = ans.chars().rev().collect::<String>();
    println!("{}", ans);
}
//  [rust]
use proconio::input;
use proconio::marker::{Chars, Usize1};
use std::iter::Iterator;
use std::collections::HashSet;
use std::cmp::*;
use itertools::Itertools;

#[allow(unused_macros)]
macro_rules! max {
    ($x:expr) => {
      $x
    };
    ($x:expr, $($xs:tt)+) => {
      max($x,max!($($xs)+))
    };
  }
  
  #[allow(unused_macros)]
  macro_rules! min {
    ($x:expr) => {
      $x
    };
    ($x:expr, $($xs:tt)+) => {
      min($x,min!($($xs)+))
    };
  }

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

fn main() {
    input! {
    mut n: i64
    }

    let mut tmp = 26;
    let mut l = 1;
    while n > tmp {
        n -= tmp;
        tmp *= 26;
        l += 1;
    }
    n -= 1;

    let mut vec = vec![];

    for _ in 0..l {
      let amari = n % 26;
      n = n / 26;
      vec.push((amari as u8 + b'a') as char);
    }

     println!("{}", vec.iter().rev().collect::<String>());
}
//  [rust]
use proconio::input;

fn main() {
    input! {
        mut n: u128
    }

    solve(n);
}

fn solve(mut n: u128) {
    let mut ans: Vec<char> = vec![];
    while n > 0 {
        n -= 1;
        let x = to_char((n % 26) as u32);
        ans.push(x);
        n /= 26;
    }
    ans.reverse();

    for c in ans {
        print!("{}", c);
    }
    println!("");
}

fn to_char(num: u32) -> char {
    match num {
        0 => 'a',
        1 => 'b',
        2 => 'c',
        3 => 'd',
        4 => 'e',
        5 => 'f',
        6 => 'g',
        7 => 'h',
        8 => 'i',
        9 => 'j',
        10 => 'k',
        11 => 'l',
        12 => 'm',
        13 => 'n',
        14 => 'o',
        15 => 'p',
        16 => 'q',
        17 => 'r',
        18 => 's',
        19 => 't',
        20 => 'u',
        21 => 'v',
        22 => 'w',
        23 => 'x',
        24 => 'y',
        _ => 'z',
    }
}
//  [rust]
#[allow(unused_imports)]
use proconio::{
    fastout, input,
};

#[fastout]
fn main() {
    input! {
        mut n: i64,
    }
    let mut ans = String::new();
    while n > 0 {
        let b = (n % 26 - 1) as u8;
        ans.push((b'a' + b) as char);
        n -= b as i64;
        n /= 26;
    }
    println!("{}", ans.chars().rev().collect::<String>());
}
//  [rust]
#![allow(unused_macros)]
#![allow(dead_code)]
#![allow(unused_imports)]

use itertools::Itertools;
use proconio::*;
use std::collections::VecDeque;
use std::io::stdin;
use std::str::FromStr;
use text_io::*;

const U_INF: usize = 1 << 60;
const I_INF: isize = 1 << 60;

fn main() {
    let mut sc = Scanner::new();
    let n = sc.next_usize();
    let mut n = n;
    let mut s = String::new();

    while n != 0 {
        let a = n / 26;
        let b = (n % 26 - 1) as u8;
        s.push((b'a' + b) as char);
        n = a;
    }

    println!("{}", s.chars().rev().collect::<String>());
}

pub struct Scanner {
    buf: VecDeque<String>,
}

impl Scanner {
    pub fn new() -> Self {
        Self {
            buf: VecDeque::new(),
        }
    }

    fn scan_line(&mut self) {
        let mut flag = 0;
        while self.buf.is_empty() {
            let mut s = String::new();
            stdin().read_line(&mut s).unwrap();
            let mut iter = s.split_whitespace().peekable();
            if iter.peek().is_none() {
                if flag >= 5 {
                    panic!("There is no input!");
                }
                flag += 1;
                continue;
            }

            for si in iter {
                self.buf.push_back(si.to_string());
            }
        }
    }

    pub fn next<T: FromStr>(&mut self) -> T {
        self.scan_line();
        self.buf
            .pop_front()
            .unwrap()
            .parse()
            .unwrap_or_else(|_| panic!("Couldn't parse!"))
    }

    pub fn next_usize(&mut self) -> usize {
        self.next()
    }

    pub fn next_isize(&mut self) -> isize {
        self.next()
    }

    pub fn next_chars(&mut self) -> Vec<char> {
        self.next::<String>().chars().collect_vec()
    }

    pub fn next_string(&mut self) -> String {
        self.next()
    }

    pub fn fill_vec_line<T: FromStr>(&mut self, v: &mut Vec<T>) {
        for vi in v {
            *vi = self.next();
        }
    }

    pub fn fill_vec<T: FromStr>(&mut self, v: &mut Vec<Vec<T>>) {
        for vi in v {
            for vii in vi {
                *vii = self.next();
            }
        }
    }

    pub fn make_vec_line<T: FromStr + Default + Clone>(&mut self, i: usize) -> Vec<T> {
        let mut v = vec![Default::default(); i];
        self.fill_vec_line(&mut v);
        v
    }

    pub fn make_vec<T: FromStr + Default + Clone>(&mut self, i: usize, j: usize) -> Vec<Vec<T>> {
        let mut v = vec![vec![Default::default(); j]; i];
        self.fill_vec(&mut v);
        v
    }
}
//  [rust]
use proconio::{input, fastout};
// use std::collections::VecDeque;


// fn rec_convert_digit_10_26(res_char_vec: &mut VecDeque<char>, n: f64) {
//     let current_digit = n.log(26.).floor();
//     if current_digit == 0. {
//         res_char_vec.push_front(((n + 96.) as u8) as char);
//     } else {
//         let current_digit_num = (n / (26. as f64).powi(current_digit as i32)).floor();
//         // println!("{} / {} = {}", n, (26. as f64).powi(current_digit as i32), current_digit_num);
//         // println!("{} -> {}", n, n - current_digit_num);
//         rec_convert_digit_10_26(res_char_vec, n - current_digit_num * (26. as f64).powi(current_digit as i32));
//         res_char_vec.push_front(((current_digit_num + 96.) as u8) as char);
//     }
//     
// }
// 
// // #[fastout]
// fn main() {
//     input! {
//         n: f64,
//     }
// 
//     let mut res_char_vec = VecDeque::new();
// 
//     rec_convert_digit_10_26(&mut res_char_vec, n);
// 
//     let res_string: String = res_char_vec.into_iter().collect();
// 
//     println!("{}", res_string);
// }

#[fastout]
fn main() {
    input! {
        mut n: usize,
    }
    let mut res = String::from("");
    let digit_char;
    if n % 26 == 0 {
        digit_char = 'z';
    } else {
        digit_char = ((n % 26) as u8 + 96) as char;
    }
    // println!("{}", (n % 26) as u8);
    res.push(digit_char);
    n -= n % 26;
    n /= 26;
    while n > 0 {
        let digit_char = ((n % 26) as u8 + 96) as char;
        // println!("{}", (n % 26) as u8);
        res.push(digit_char);
        n -= n % 26;
        n /= 26;
    };

    println!("{}", res.chars().rev().collect::<String>());
}
//  [swift]
let N = Int(readLine()!)!
let atoz = Array("abcdefghijklmnopqrstuvwxyz")
var n = N
var result = ""
while n > 0 {
    result += String(atoz[(n-1)%26])
    n = Int((n-1) / 26)
}
print(String(result.reversed()))
//  [swift]
import Foundation

var N = UInt(readLine()!)!

let alphabet = ["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"]

var devided = N
var String = ""

for i in 1...100{
    
    if N % 26 == 0 {
        String = "z" + String
        N -= 1
    } else if N % 26 == 1 {
        String = "a" + String
    } else if N % 26 == 2 {
        String = "b" + String
    } else if N % 26 == 3 {
        String = "c" + String
    } else if N % 26 == 4 {
        String = "d" + String
    } else if N % 26 == 5 {
        String = "e" + String
    } else if N % 26 == 6 {
        String = "f" + String
    } else if N % 26 == 7 {
        String = "g" + String
    } else if N % 26 == 8 {
        String = "h" + String
    } else if N % 26 == 9 {
        String = "i" + String
    } else if N % 26 == 10 {
        String = "j" + String
    } else if N % 26 == 11 {
        String = "k" + String
    } else if N % 26 == 12 {
        String = "l" + String
    } else if N % 26 == 13 {
        String = "m" + String
    } else if N % 26 == 14 {
        String = "n" + String
    } else if N % 26 == 15 {
        String = "o" + String
    } else if N % 26 == 16 {
        String = "p" + String
    } else if N % 26 == 17 {
        String = "q" + String
    } else if N % 26 == 18 {
        String = "r" + String
    } else if N % 26 == 19 {
        String = "s" + String
    } else if N % 26 == 20 {
        String = "t" + String
    } else if N % 26 == 21 {
        String = "u" + String
    } else if N % 26 == 22 {
        String = "v" + String
    } else if N % 26 == 23 {
        String = "w" + String
    } else if N % 26 == 24 {
        String = "x" + String
    } else if N % 26 == 25 {
        String = "y" + String
    }
    N /= 26
    if N == 0{
        break
    }

}

print(String)
//  [swift]
import Foundation
//10^15
//1000000000000001
// Decimal型の有効桁数は38桁
var N = UInt(readLine()!)!
let m = UInt(26)

var a: UInt
var output = ""
var c: String

repeat {
    a = N % m
    N = N / m

    switch (a) {
    case 1:
        c = "a"
    case 2:
        c = "b"
    case 3:
        c = "c"
    case 4:
        c = "d"
    case 5:
        c = "e"
    case 6:
        c = "f"
    case 7:
        c = "g"
    case 8:
        c = "h"
    case 9:
        c = "i"
    case 10:
        c = "j"
    case 11:
        c = "k"
    case 12:
        c = "l"
    case 13:
        c = "m"
    case 14:
        c = "n"
    case 15:
        c = "o"
    case 16:
        c = "p"
    case 17:
        c = "q"
    case 18:
        c = "r"
    case 19:
        c = "s"
    case 20:
        c = "t"
    case 21:
        c = "u"
    case 22:
        c = "v"
    case 23:
        c = "w"
    case 24:
        c = "x"
    case 25:
        c = "y"
    case 0:
        c = "z"
        N = N - 1
    default:
        fatalError()
    }
    output = c + output
} while (N != 0)

print(output)
//  [swift]
import Foundation

func readInt() -> Int {
    return Int(readLine()!)!
}

func mainC() {
    var N = readInt()

    var pows = [1]
    var results: [Int] = []

    (0...10).forEach { index in
        pows.append(pows[index] * 26)
    }

    var numbers = pows

    (1...10).forEach { index in
        numbers[index] = numbers[index - 1] + numbers[index]
    }

    pows.enumerated().reversed().forEach { (index, element) in
        if numbers[index] <= N {
            let result = N / element
            if result > 26 {
                results.append(26)
                N %= element
                N += (result - 26) * element
            } else {
                results.append(result)
                N %= element
            }
        }
    }

    if N != 0 {
        results.append(N)
    }

    let name = results.map { offset in
        return Character(UnicodeScalar(Int(Character("a").unicodeScalars.first!.value) + offset - 1)!)
    }

    print(String(name))
}

mainC()
//  [swift]
import Foundation

func readInt() -> Int {
    return Int(readLine()!)!
}

func mainC() {
    var N = readInt()

    var pows = [26]
    var results: [Int] = []

    (0...9).forEach { index in
        pows.append(pows[index] * 26)
    }

    var numbers = pows

    (1...9).forEach { index in
        numbers[index] = numbers[index - 1] + numbers[index]
    }

    pows.enumerated().reversed().forEach { (index, element) in
        if numbers[index] <= N {
            let result = N / element
            if result > 26 {
                results.append(26)
                N %= element
                N += (result - 26) * element
            } else {
                results.append(result)
                N %= element
            }
        }
    }

    if N != 0 {
        results.append(N)
    }

    let name = results.map { offset in
        return Character(UnicodeScalar(Int(Character("a").unicodeScalars.first!.value) + offset - 1)!)
    }

    print(String(name))
}

mainC()
//  [swift]
import Foundation

func readInt() -> Int {
    return Int(readLine()!)!
}

func mainC() {
    var N = readInt()

    var pows = [26]
    var results: [Int] = []

    // 26の0, 1, 2, 3, 4...9錠を求める
    (0...9).forEach { index in
        pows.append(pows[index] * 26)
    }

    pows.reversed().forEach { pow in
        if pow < N {
            results.append(N / pow)
            N %= pow
        }
    }

    results.append(N)

    let name = results.map { offset in
        return Character(UnicodeScalar(Int(Character("a").unicodeScalars.first!.value) + offset - 1)!)
    }

    print(String(name))
}

mainC()
//  [typescript]
import { readFileSync } from "fs";

const [cin, nCin, biCin] = (() => {
  const inputs = readFileSync("/dev/stdin", "utf-8").split(/[\n|\s]/);
  let count = 0;
  const cin = () => inputs[count++];
  return [cin, () => Number(cin()), () => BigInt(cin())];
})() as [() => string, () => number, () => bigint];

const range = (n: number | bigint) => [...Array(Number(n))].map((_, i) => i);

const getName = (n: bigint): string => {
  const alphabets = range(26).map((i) => String.fromCharCode("a".charCodeAt(0) + i));
  const getName = (n: bigint, l: bigint): string => {
    const m = 26n ** l;
    return n <= m
      ? range(l).reduce(
          ({ num, str }, _) => ({
            num: num / 26n,
            str: alphabets[Number(num % 26n)] + str,
          }),
          { num: n - 1n, str: "" }
        ).str
      : getName(n - m, l + 1n);
  };
  return getName(n, 1n);
};

{
  const N = biCin();
  console.log(getName(N));
}
//  [typescript]
import { readFileSync } from "fs";

const range = (n: number | bigint) => [...Array(Number(n))].map((_, i) => i);

const getName = (n: bigint): string => {
  const alphabets = range(26).map(i => String.fromCharCode("a".charCodeAt(0) + i));

  const getName = (n: bigint, l: bigint): string => {
    const m = 26n ** l;

    return n <= m
      ? range(l).reduce(
          ({ num, str }, _) => ({
            num: num / 26n,
            str: alphabets[Number(num % 26n)] + str,
          }),
          { num: n - 1n, str: "" }
        ).str
      : getName(n - m, l + 1n);
  };

  return getName(n, 1n);
};

{
  const input = readFileSync("/dev/stdin", "utf8");
  const N = BigInt(input);
  console.log(getName(N));
}
//  [typescript]
{
  const run = (input: string) => {
    const list = 'abcdefghijklmnopqrstuvwxyz'.split("")
    let n = parseInt(input.trim())

    let result = []
    while (n > 0) {
      const tmp = n % 26
      const key = tmp === 0 ? 25 : tmp - 1
      result.push(list[key])
      n = n === 26 ? 0 : Math.floor(n / 26);
    }

    return result.reverse().join('')
  }

  const Main = (input: string) => {
    console.log(run(input))
  };

  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}
//  [python]
n = input()
total = 0
for i in range(10):
    total += n.count(f'{i}') * i
print('Yes' if total%9==0 else 'No')
//  [python]
n = input()
total = 0
for i in range(10):
    total += n.count(str(i)) * i
if total % 9 == 0:
    print("Yes")
else:
    print("No")
//  [python]
N = str(input())
cnt = 0
for i in range(10):
  cnt += i * N.count(str(i))
  
print('Yes' if cnt % 9 == 0 else 'No')
//  [python]
#abc176b
N=input()
s=0
for i in range(len(N)):
 s+=int(N[i])
print(s)
if s%9==0:
 print('Yes')
else:
 print('No')
//  [python]
n = input()

n_list = list(n)
ans = sum(n_list)

print("Yes" if (ans % 9) == 0 else "No")
//  [python]
import math

n = int(input())
ans = 0

while n:
    ans = ans + (n % 10)
    n = math.floor(n / 10)

if ans % 9 == 0:
    print('Yes')
else:
    print('No')
//  [java]
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        int mod = 0;
        for(int i=0;i<s.length();i++){int a = (int)(s.charAt(i))-48;
                                      if(a>0){mod+=a;mod%=9;}                                    
                                     }       
		if(mod==0 || mod%9==0){System.out.println("Yes");}
      else{System.out.println(mod);}
	}
}
//  [java]
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        int mod = 0;
        for(int i=0;i<s.length();i++){int a = (int)(s.charAt(i))-48;
                                      if(a>0){mod+=a;}                                    
                                     }       
		if(mod==0 || mod%9==0){System.out.println("Yes");}
      else{System.out.println(mod);}
	}
}
//  [java]
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        int mod = 0;
        for(int i=0;i<s.length();i++){int a = (int)(s.charAt(i));
                                      mod+=a;
                                      mod%=9;
                            }       
		if(mod==0){System.out.println("Yes");}
      else{System.out.println("No");}
	}
}