class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.u: D = None
        self.o: B = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: E = None
        self.y: A = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: E = None
        self.y: A = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: A = None
        self.txt = txt

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

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