def test2(self): self.assertTrue(check('bcdaa'))
def test7(self): self.assertFalse(check('BdR'))
def test1(self): self.assertTrue(check('bcdc'))
def test6(self): self.assertFalse(check('abc'))
def test5(self): self.assertTrue(check('bcdacbcaa'))
def test4(self): self.assertTrue(check('bcdacbcc'))
def test3(self): self.assertTrue(check('bcdacc'))
from grammar_checker import check from common import * while True: string = input() if is_input_valid(string) and check(string): print('String is correct') else: print('String is not part of grammar')