human
Maximized partitions of a string such that each character of the string appears in one substring | Function to print all the substrings.
Stores the substrings.
Stores last index of characters of string s.
Find the last position of each character in the string.
Update the last index.
Iterate the given string.
Get the last index of s [ i ].
Extend the current partition characters last pos.
If the current pos of character equals the min pos then the end of partition.
Add the respective character to the string.
Store the partition 's  len and reset variables.
Update the minp and str.
Input string.
Function call"
Solution in Python:
 Give me a code to maximized partitions of a string such that each character of the string appears in one substring and the other steps required?
assistant
#Here is code to maximized partitions of a string such that each character of the string appears in one substring and the other steps required.
 def print_substring ( s ) :
	n = len ( s )
	str = " "
	ans = [ ]
	if ( n == 0 ) :
		print ( " - 1" )
		return
	last_pos = [ - 1 ] * 26
	for i in range ( n - 1 , - 1 , - 1 ) :
		if ( last_pos [ ord ( s [ i ] ) - ord ( ' a ' ) ] == - 1 ) :
			last_pos [ ord ( s [ i ] ) - ord ( ' a ' ) ] = i
	minp = - 1
	for i in range ( n ) :
		lp = last_pos [ ord ( s [ i ] ) - ord ( ' a ' ) ]
		minp = max ( minp , lp )
		if ( i == minp ) :
			str += s [ i ]
			print ( str , end = " ▁ " )
			minp = - 1
			str = " "
		else :
			str += s [ i ]
S = " ababcbacadefegdehijhklij "
print_substring ( S )