class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.p: E = None
        self.r: B = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: F = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: J = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: J = None
        self.p: J = None
        self.r: C = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: I = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: E = None
        self.q: C = None
        self.p: D = None
        self.v: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.q: D = None
        self.p: H = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: D = None
        self.o: B = None
        self.u: G = None
        self.z: B = None
        self.r: A = None
        self.s: D = None
        self.t: H = None
        self.q: D = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: F = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: J = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: J = None
        self.p: J = None
        self.r: C = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: I = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: E = None
        self.q: C = None
        self.p: D = None
        self.v: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.q: D = None
        self.p: H = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: D = None
        self.o: B = None
        self.u: G = None
        self.z: B = None
        self.r: A = None
        self.s: D = None
        self.t: H = None
        self.q: D = None
        self.y: A = None
        self.txt = txt

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

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