class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.r: A = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.v: D = None
        self.x: F = None
        self.o: F = None
        self.q: D = None
        self.t: A = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: C = None
        self.v: E = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.r: A = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.v: D = None
        self.x: F = None
        self.o: F = None
        self.q: D = None
        self.t: A = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: C = None
        self.v: E = None
        self.p: A = None
        self.txt = txt

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

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