using System;
using System.Collections.Generic;
namespace test
{
public class test
{
public static void Main()
{
List<int> x = new List<int>();
x.Add(1);
x.Add(4);
x.Add(9);
foreach(int i in x){
x[2] = 3;
}
foreach(int i in x){
System.Console.WriteLine(i);
}
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKCm5hbWVzcGFjZSB0ZXN0CnsKCXB1YmxpYyBjbGFzcyB0ZXN0Cgl7CgkJcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQoJCXsKCQkJTGlzdDxpbnQ+IHggPSBuZXcgTGlzdDxpbnQ+KCk7CgkJCXguQWRkKDEpOwoJCQl4LkFkZCg0KTsKCQkJeC5BZGQoOSk7CgkJCWZvcmVhY2goaW50IGkgaW4geCl7CgkJCQl4WzJdID0gMzsKCQkJfQoJCQlmb3JlYWNoKGludCBpIGluIHgpewoJCQkJU3lzdGVtLkNvbnNvbGUuV3JpdGVMaW5lKGkpOwoJCQl9CQkJCgkJfQoJfQp9