class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: G = None
        self.r: H = None
        self.u: B = None
        self.y: G = None
        self.w: D = None
        self.s: C = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: H = None
        self.u: E = None
        self.q: F = None
        self.o: D = None
        self.r: A = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: C = None
        self.z: H = None
        self.r: B = None
        self.t: H = None
        self.s: G = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: C = None
        self.p: D = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: D = None
        self.p: C = None
        self.v: G = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: H = None
        self.u: E = None
        self.q: F = None
        self.o: D = None
        self.r: A = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: C = None
        self.z: H = None
        self.r: B = None
        self.t: H = None
        self.s: G = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: C = None
        self.p: D = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: D = None
        self.p: C = None
        self.v: G = None
        self.o: D = None
        self.txt = txt

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

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