human
Printing Shortest Common Supersequence | returns shortest supersequence of X and Y.
dp [ i ] [ j ] contains length of shortest supersequence for X [ 0. . i - 1 ] and Y [ 0. . j - 1 ].
Fill table in bottom up manner.
Below steps follow recurrence relation.
string to store the shortest supersequence.
Start from the bottom right corner and one by one push characters in output string.
If current character in X and Y are same , then current character is part of shortest supersequence.
Put current character in result.
reduce values of i , j and index.
If current character in X and Y are different.
Put current character of Y in result.
reduce values of j and index.
Put current character of X in result.
reduce values of i and index.
If Y reaches its end , put remaining characters of X in the result string.
If X reaches its end , put remaining characters of Y in the result string.
reverse the string and return it.
Driver Code"
Solution in Python:

=====
Give me a code to printing Shortest Common Supersequence and the other steps required?
assistant
#Here is code to printing Shortest Common Supersequence and the other steps required.
 def printShortestSuperSeq ( x , y ) :
	m = len ( x )
	n = len ( y )
	dp = [ [ 0 for i in range ( n + 1 ) ] for j in range ( n + 1 ) ]
	for i in range ( m + 1 ) :
		for j in range ( n + 1 ) :
			if i == 0 :
				dp [ i ] [ j ] = j
			elif j == 0 :
				dp [ i ] [ j ] = i
			elif x [ i - 1 ] == y [ j - 1 ] :
				dp [ i ] [ j ] = 1 + dp [ i - 1 ] [ j - 1 ]
			else :
				dp [ i ] [ j ] = 1 + min ( dp [ i - 1 ] [ j ] , dp [ i ] [ j - 1 ] )
	string = " "
	i = m
	j = n
	while i > 0 and j > 0 :
		if x [ i - 1 ] == y [ j - 1 ] :
			string += x [ i - 1 ]
			i -= 1
			j -= 1
		elif dp [ i - 1 ] [ j ] > dp [ i ] [ j - 1 ] :
			string += y [ j - 1 ]
			j -= 1
		else :
			string += x [ i - 1 ]
			i -= 1
	while i > 0 :
		string += x [ i - 1 ]
		i -= 1
	while j > 0 :
		string += y [ j - 1 ]
		j -= 1
	string = list ( string )
	string . reverse ( )
	return ' ' . join ( string )
if __name__ == " _ _ main _ _ " :
	x = " AGGTAB "
	y = " GXTXAYB "
	print ( printShortestSuperSeq ( x , y ) )