class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: B = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: E = None
        self.v: C = None
        self.s: C = None
        self.txt = txt

k = A("k")
h = B("h")
a = C("a")
f = D("f")
d = E("d")
n = F("n")
l = E("l")

k.o = h
k.v = h
k.t = f
h.u = n
a.y = n
f.v = n
f.o = k
f.w = l
f.z = a
f.u = h
f.s = h
d.z = k
d.o = n
d.q = h
d.s = f
d.r = f
n.z = h
n.y = l
n.v = a
n.s = a
l.z = k
l.o = n
l.q = h
l.s = f
l.r = f
assert f.s.u.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: B = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: E = None
        self.v: C = None
        self.s: C = None
        self.txt = txt

k = A("k")
h = B("h")
a = C("a")
f = D("f")
d = E("d")
n = F("n")
l = E("l")

k.o = h
k.v = h
k.t = f
h.u = n
a.y = n
f.v = n
f.o = k
f.w = l
f.z = a
f.u = h
f.s = h
d.z = k
d.o = n
d.q = h
d.s = f
d.r = f
n.z = h
n.y = l
n.v = a
n.s = a
l.z = k
l.o = n
l.q = h
l.s = f
l.r = f
assert f.s.u.v.y.txt == "n"