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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: F = None
        self.v: A = None
        self.y: H = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: A = None
        self.o: A = None
        self.p: E = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: A = None
        self.r: A = None
        self.t: G = None
        self.s: G = None
        self.q: B = None
        self.y: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: F = None
        self.y: F = None
        self.q: F = None
        self.w: D = None
        self.p: D = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: G = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: F = None
        self.v: A = None
        self.y: H = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: A = None
        self.o: A = None
        self.p: E = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: A = None
        self.r: A = None
        self.t: G = None
        self.s: G = None
        self.q: B = None
        self.y: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: F = None
        self.y: F = None
        self.q: F = None
        self.w: D = None
        self.p: D = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: G = None
        self.p: E = None
        self.txt = txt

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

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