P9765 [ROIR 2021] Date (Day 2)
Background
**Translated from [ROIR 2021](http://neerc.ifmo.ru/school/archive/2020-2021.html) Day 2 T1 [Календарь на Альфе Центавра](http://neerc.ifmo.ru/school/archive/2020-2021/ru-olymp-regional-2021-day2.pdf)**。
Description
On an alien planet, a year has $m$ months, each month has $d$ days, and a week has $w$ days.
To distinguish each day in a week, humans use weekday names, while the residents of this planet use lowercase English letters `a`$\sim$`z` to represent each day of the week.
It is known that Year $1$ Month $1$ Day $1$ corresponds to weekday `a`. Find which weekday Year $k$ Month $j$ Day $i$ corresponds to.
Input Format
The first line contains three integers $d,m,w$。
The second line contains three integers $i,j,k$。
Output Format
Output a single letter, representing which weekday Year $k$ Month $j$ Day $i$ corresponds to.
Explanation/Hint
Constraints:
For all subtasks, $1\le d,m\le 100$,$1\le w\le 26$,$1\le i\le d$,$1\le j\le m$,$1\le k\le 10^9$。
| Subtask ID | Special Constraints | Score |
| :--------: | :-----------------: | :---: |
| $1$ | $d=m=1$ | $16$ |
| $2$ | $m=1$,$k\le 10^7$ | $16$ |
| $3$ | $i=j=1$ | $17$ |
| $4$ | $k=1$ | $17$ |
| $5$ | $k\le 100$ | $17$ |
| $6$ | No special constraints | $17$ |
Translated by ChatGPT 5