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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: H = None
        self.q: B = None
        self.o: E = None
        self.t: G = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: H = None
        self.v: D = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: B = None
        self.x: D = None
        self.z: B = None
        self.o: E = None
        self.y: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: H = None
        self.q: B = None
        self.o: E = None
        self.t: G = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: H = None
        self.v: D = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: B = None
        self.x: D = None
        self.z: B = None
        self.o: E = None
        self.y: D = None
        self.txt = txt

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

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