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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: H = None
        self.t: A = None
        self.z: A = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: C = None
        self.txt = txt

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

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

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

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

j = A("j")
h = B("h")
f = C("f")
d = D("d")
n = E("n")
l = F("l")
a = G("a")
m = H("m")
b = G("b")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: H = None
        self.t: A = None
        self.z: A = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: C = None
        self.txt = txt

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

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

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

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

j = A("j")
h = B("h")
f = C("f")
d = D("d")
n = E("n")
l = F("l")
a = G("a")
m = H("m")
b = G("b")

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