Ignore all my comments Problem Analysis Solution CPP JAVA PYTHON APPROACH Use approach used in Check Balanced Paranthesis Trick: Search for how to take multiline input in your particular language with proper Exception Handling