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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.x: H = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.x: H = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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