class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.v: B = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: B = None
        self.o: A = None
        self.w: F = None
        self.v: D = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: B = None
        self.s: E = None
        self.u: E = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: B = None
        self.o: A = None
        self.w: F = None
        self.v: D = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: B = None
        self.s: E = None
        self.u: E = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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