What leader ruled Finland in world war 2?

At early war president was Kyösti Kallio. He died in 1941. Next president was Risto Ryti. He left the office in 1944. Carl Gustav Mannerheim succeeded him and was the president to the end of war.