public static void Main()
Console.WriteLine("First line: " + s1.text);
Console.WriteLine("Second line: " + s2.text);
string[] ss1 = s1.text.Split(new char[] { ' ' });
string[] ss2 = s2.text.Split(new char[] { ' ' });
foreach (string world in ss1) {
if (maxLength < world.Length) {
maxLength = world.Length;
foreach (string world in ss2) {
if (maxLength2 < world.Length) {
maxLength2 = world.Length;
Console.WriteLine("-----------After replalce-----------");
Console.WriteLine("First line: " + s1.text.Replace(maxWorld, maxWorld2));
Console.WriteLine("Second line: " + s2.text.Replace(maxWorld2, maxWorld));