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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: F = None
        self.r: C = None
        self.t: G = None
        self.z: D = None
        self.u: D = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: E = None
        self.s: A = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: F = None
        self.r: C = None
        self.t: G = None
        self.z: D = None
        self.u: D = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: E = None
        self.s: A = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

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