For Pycharm IDE, we want to use redirect input file while running the code.
- You can make a file for a input data as like *.in.
- Typing auto_redirect_input_file.py in top of code.
- Click the "Edit Configuration".
- Put the file name *.in in "Script parameters".