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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: A = None
        self.x: A = None
        self.u: D = None
        self.w: F = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: D = None
        self.o: G = None
        self.w: D = None
        self.z: C = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: A = None
        self.x: A = None
        self.u: D = None
        self.w: F = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: D = None
        self.o: G = None
        self.w: D = None
        self.z: C = None
        self.t: A = None
        self.txt = txt

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

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

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