Please read the following table in Markdown format and then answer the question according to the table. Table cells in one row are seperated by '|', and different rows are seperated by '
'.

Table:
| order in\nposition | president of\nthe republic | length of\nthe presidential\naction | rank by\nlength\nof term(s) | notes |
| --- | --- | --- | --- | --- |
| 1 | K. J. Ståhlberg | 5 years, 220 days | 8 | 1 term serving |
| 2 | Lauri Kristian Relander | 6 years, 0 days\none leap year (1928) | 6 | 1 term serving |
| 3 | P. E. Svinhufvud | 5 years, 364 days\ntwo leap years (1932 and 1936) | 6 | 1 term serving |
| 4 | Kyösti Kallio | 3 years, 293 days | 9 | * resigned due to poor health |
| 5 | Risto Ryti | 3 years, 229 days | 10 | * resigned due to agreement with Nazi Germany\n(after remainder of Kallio's term and during 1 additional, exceptionally 2 years long term) |
| 6 | Gustaf Mannerheim | 1 year, 219 days | 11 | * resigned due to poor health and after not being prosecuted in war responsibility trials |
| 7 | J. K. Paasikivi | 9 years, 356 days | 4 | 2 terms serving (remainder of Mannerheim's and 1 whole) |
| 8 | Urho Kekkonen | 25 years, 332 days | 1 | 3 whole terms serving (the 3rd exceptionally 10 years)\n* resigned during the 4th term due to poor health |
| 9 | Mauno Koivisto | 12 years, 33 days | 2 | 2 terms serving |
| 10 | Martti Ahtisaari | 6 years, 0 days\ntwo leap years (1996 and 2000) | 5 | 1 term serving |
| 11 | Tarja Halonen | 12 years, 0 days | 3 | 2 terms serving |
| 12 | Sauli Niinistö | 2 years, 115 days | incumbent: first term serving | incumbent: first term serving |
Question:
who was the only president to resign due to agreements with nazi germany?
Answer:
Risto Ryti