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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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