This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python3 | |
| import sys | |
| from collections import deque | |
| def read_input(): | |
| data = [line.rstrip("\n") for line in sys.stdin.readlines()] | |
| # remove leading/trailing empty lines | |
| while data and data[0].strip()=="": | |
| data.pop(0) | |
| if not data: |