class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.v: I = None
        self.q: D = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: H = None
        self.t: H = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: A = None
        self.s: G = None
        self.q: H = None
        self.t: I = None
        self.x: I = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: B = None
        self.u: I = None
        self.o: F = None
        self.v: H = None
        self.z: E = None
        self.p: F = None
        self.s: B = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: G = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: H = None
        self.t: H = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: A = None
        self.s: G = None
        self.q: H = None
        self.t: I = None
        self.x: I = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: B = None
        self.u: I = None
        self.o: F = None
        self.v: H = None
        self.z: E = None
        self.p: F = None
        self.s: B = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: G = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

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

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