class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: A = None
        self.r: C = None
        self.v: H = None
        self.w: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.r: H = None
        self.x: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: F = None
        self.t: I = None
        self.s: J = None
        self.z: J = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: D = None
        self.y: F = None
        self.u: G = None
        self.s: H = None
        self.z: F = None
        self.o: C = None
        self.r: H = None
        self.v: C = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: I = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: F = None
        self.z: B = None
        self.p: F = None
        self.v: B = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: E = None
        self.q: B = None
        self.s: G = None
        self.t: B = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: C = None
        self.r: E = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

m = A("m")
f = B("f")
k = C("k")
h = D("h")
g = E("g")
d = F("d")
a = G("a")
b = H("b")
j = I("j")
i = J("i")

m.z = k
m.p = h
f.y = d
f.w = d
f.s = m
f.r = k
f.v = b
f.o = h
k.v = f
k.y = m
k.r = b
k.x = d
k.z = a
h.r = f
h.y = d
h.t = j
h.s = i
h.z = i
h.v = m
g.t = j
g.w = h
g.y = d
g.z = d
g.u = a
g.s = b
g.r = b
g.o = k
g.v = k
g.x = k
d.o = h
d.u = j
d.t = g
a.x = h
a.o = d
a.p = d
a.z = f
a.v = f
a.t = k
b.v = a
b.o = a
b.t = d
j.u = b
j.p = g
j.q = f
j.t = f
j.s = a
j.x = h
i.v = b
i.s = k
i.r = g
i.t = h
i.x = h
assert f.y.u.s.p.u.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: A = None
        self.r: C = None
        self.v: H = None
        self.w: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.r: H = None
        self.x: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: F = None
        self.t: I = None
        self.s: J = None
        self.z: J = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: D = None
        self.y: F = None
        self.u: G = None
        self.s: H = None
        self.z: F = None
        self.o: C = None
        self.r: H = None
        self.v: C = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: I = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: F = None
        self.z: B = None
        self.p: F = None
        self.v: B = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: E = None
        self.q: B = None
        self.s: G = None
        self.t: B = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: C = None
        self.r: E = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

m = A("m")
f = B("f")
k = C("k")
h = D("h")
g = E("g")
d = F("d")
a = G("a")
b = H("b")
j = I("j")
i = J("i")

m.z = k
m.p = h
f.y = d
f.w = d
f.s = m
f.r = k
f.v = b
f.o = h
k.v = f
k.y = m
k.r = b
k.x = d
k.z = a
h.r = f
h.y = d
h.t = j
h.s = i
h.z = i
h.v = m
g.t = j
g.w = h
g.y = d
g.z = d
g.u = a
g.s = b
g.r = b
g.o = k
g.v = k
g.x = k
d.o = h
d.u = j
d.t = g
a.x = h
a.o = d
a.p = d
a.z = f
a.v = f
a.t = k
b.v = a
b.o = a
b.t = d
j.u = b
j.p = g
j.q = f
j.t = f
j.s = a
j.x = h
i.v = b
i.s = k
i.r = g
i.t = h
i.x = h
assert f.y.u.s.p.u.t.s.txt == "m"