# 程序设计能力实训

1127. 生理高峰

### 样例

Input
3
0 0 0 100
4 5 6 7
283 102 23 320

Output
case #0:
the next triple peak occurs in 21152 days.
case #1:
the next triple peak occurs in 16994 days.
case #2:
the next triple peak occurs in 8910 days.