/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone {
static class S {
int val;
}
S[] s = new S[4];
for ( int i = 0; i < 4; ++i ) s[i] = new S();
s[0].val = 10;
s[1].val = 20;
s[2].val = 30;
s[3].val = 40;
for ( int i
= 0; i
< 4; ++i
) System.
out.
printf( "s[%d]=%d\n", i, s
[i
].
val );
S ns = s[1];
s[1].val = 100;
for ( int i
= 0; i
< 4; ++i
) System.
out.
printf( "s[%d]=%d\n", i, s
[i
].
val ); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lIHsKCiAgICBzdGF0aWMgY2xhc3MgUyB7CgkJaW50IHZhbDsKCX0KCglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIEV4Y2VwdGlvbiB7CgkJU1tdIHMgPSBuZXcgU1s0XTsKCQlmb3IgKCBpbnQgaSA9IDA7IGkgPCA0OyArK2kgKSBzW2ldID0gbmV3IFMoKTsKCQlzWzBdLnZhbCA9IDEwOwoJCXNbMV0udmFsID0gMjA7CgkJc1syXS52YWwgPSAzMDsKCQlzWzNdLnZhbCA9IDQwOwoJCWZvciAoIGludCBpID0gMDsgaSA8IDQ7ICsraSApIFN5c3RlbS5vdXQucHJpbnRmKCAic1slZF09JWRcbiIsIGksIHNbaV0udmFsICk7CgoJCVN5c3RlbS5vdXQucHJpbnRsbigpOwoJCVMgbnMgPSBzWzFdOwoJCXNbMV0udmFsID0gMTAwOwoJCWZvciAoIGludCBpID0gMDsgaSA8IDQ7ICsraSApIFN5c3RlbS5vdXQucHJpbnRmKCAic1slZF09JWRcbiIsIGksIHNbaV0udmFsICk7Cgl9Cn0=