Convert Java code to Python

Input code

Output code