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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: H = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: F = None
        self.z: H = None
        self.w: D = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.p: D = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: H = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: F = None
        self.z: H = None
        self.w: D = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.p: D = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

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

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

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