human
Lexicographically smallest string possible by inserting given character | Function to obtain lexicographically smallest string possible by inserting character c in the string s.
Traverse the string.
Check if current character is greater than the given character.
Insert the character before the first greater character.
Return the string.
Append the character at the end.
Return the string.
Function call"
Solution in Python:

=====
Write me a code to lexicographically smallest string possible by inserting given character and the other steps required?
assistant
#Here is code to lexicographically smallest string possible by inserting given character and the other steps required.
 def SmallestString ( s , c ) :
	i = 0
	while ( i < len ( s ) ) :
		if s [ i ] > c :
			s = s [ : i ] + c + s [ i : ]
			return s
		i = i + 1
	s = s + c
	return s
S = ' abd '
C = ' c '
print ( SmallestString ( S , C ) )