Given a string s containing only the characters ()[]{} , decide whether every bracket is closed by the same type and in the correct order . An opening bracket must be closed by the matching closing bracket, and brackets must close in the reverse order they were opened. Input format Input is [s] , e.g. [ ()[]{} ] .