using System;
class Test
{
public string str = "A";
}
class Program
{
static void change1(Test t)
{
t.str = "B";
}
static void change2(Test t)
{
t = new Test();
t.str = "B";
}
static void Main(string[] args)
{
Test t1 = new Test();
change1(t1);
Console.WriteLine(t1.str);
Test t2 = new Test();
change2(t2);
Console.WriteLine(t2.str);
}
}
dXNpbmcgU3lzdGVtOwoKICAgICBjbGFzcyBUZXN0CiAgICB7CiAgICAgICAgcHVibGljIHN0cmluZyBzdHIgPSAiQSI7CiAgICB9CgogICAgY2xhc3MgUHJvZ3JhbQogICAgewogICAgICAgIHN0YXRpYyB2b2lkIGNoYW5nZTEoVGVzdCB0KQogICAgICAgIHsKICAgICAgICAgICAgdC5zdHIgPSAiQiI7CiAgICAgICAgfQogICAgICAgIHN0YXRpYyB2b2lkIGNoYW5nZTIoVGVzdCB0KQogICAgICAgIHsKICAgICAgICAgICAgdCA9IG5ldyBUZXN0KCk7CiAgICAgICAgICAgIHQuc3RyID0gIkIiOwogICAgICAgIH0KCiAgICAgICAgc3RhdGljIHZvaWQgTWFpbihzdHJpbmdbXSBhcmdzKQogICAgICAgIHsKICAgICAgICAgICAgVGVzdCB0MSA9IG5ldyBUZXN0KCk7CiAgICAgICAgICAgIGNoYW5nZTEodDEpOwogICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZSh0MS5zdHIpOwoKICAgICAgICAgICAgVGVzdCB0MiA9IG5ldyBUZXN0KCk7CiAgICAgICAgICAgIGNoYW5nZTIodDIpOwogICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZSh0Mi5zdHIpOwogICAgICAgIH0KICAgIH0=