<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described.
<END_TASK>
<USER_TASK:>
Description:
Check if concatenation of two strings is balanced or not
Check if given string is balanced bracket sequence or not . ; If current bracket is an opening bracket push it to stack . ; If current bracket is a closing bracket then pop from stack if it is not empty . If stack is empty then sequence is not balanced . ; If stack is not empty , then sequence is not balanced . ; Function to check if string obtained by concatenating two bracket sequences is balanced or not . ; Check if s1 + s2 is balanced or not . ; Check if s2 + s1 is balanced or not . ; Driver Code

<ASSISTANT_TASK:>
Python Code:
def isBalanced(s ) : 
	 st = list() 
 n = len(s ) 
 for i in range(n ) : 
	 if s[i ] == '(' : 
	 st . append(s[i ] ) 
  else : 
	 if len(st ) == 0 : 
	 return False 
  else : 
	 st . pop() 
    if len(st ) > 0 : 
	 return False 
  return True 
  def isBalancedSeq(s1 , s2 ) : 
	 if(isBalanced(s1 + s2 ) ) : 
	 return True 
  return isBalanced(s2 + s1 ) 
  if __name__== "__main __": s1 = ")()(( ) ) ) ) "
	 s2 = "(( )(( )("
 if isBalancedSeq(s1 , s2 ) : 
	 print("Balanced ") 
  else : 
	 print("Not ▁ Balanced ") 
  
<END_TASK>
