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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: G = None
        self.v: D = None
        self.s: A = None
        self.o: D = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.r: H = None
        self.o: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: G = None
        self.v: D = None
        self.s: A = None
        self.o: D = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: C = None
        self.r: H = None
        self.o: C = None
        self.txt = txt

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

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

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