class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: B = None
        self.z: B = None
        self.v: G = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: C = None
        self.z: A = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: D = None
        self.q: F = None
        self.t: A = None
        self.txt = txt

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

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

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

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

j = A("j")
d = B("d")
n = C("n")
m = D("m")
l = E("l")
i = F("i")
h = G("h")
k = E("k")
e = C("e")

j.p = l
j.r = d
j.z = d
j.v = h
j.x = e
d.o = j
d.z = j
d.y = n
d.p = h
n.r = d
n.u = m
n.q = i
n.t = j
m.v = d
m.o = e
m.u = k
m.z = i
m.x = h
m.s = h
m.p = j
l.r = n
i.z = m
i.q = n
i.o = e
h.q = m
h.t = m
k.r = n
e.r = d
e.u = m
e.q = i
e.t = j
assert j.r.z.x.q.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: B = None
        self.z: B = None
        self.v: G = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: C = None
        self.z: A = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: D = None
        self.q: F = None
        self.t: A = None
        self.txt = txt

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

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

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

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

j = A("j")
d = B("d")
n = C("n")
m = D("m")
l = E("l")
i = F("i")
h = G("h")
k = E("k")
e = C("e")

j.p = l
j.r = d
j.z = d
j.v = h
j.x = e
d.o = j
d.z = j
d.y = n
d.p = h
n.r = d
n.u = m
n.q = i
n.t = j
m.v = d
m.o = e
m.u = k
m.z = i
m.x = h
m.s = h
m.p = j
l.r = n
i.z = m
i.q = n
i.o = e
h.q = m
h.t = m
k.r = n
e.r = d
e.u = m
e.q = i
e.t = j
assert j.r.z.x.q.o.u.txt == "m"