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

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

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

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

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

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

m = A("m")
a = B("a")
j = C("j")
k = D("k")
f = E("f")
c = F("c")
i = E("i")
l = E("l")

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

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

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

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

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

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

m = A("m")
a = B("a")
j = C("j")
k = D("k")
f = E("f")
c = F("c")
i = E("i")
l = E("l")

m.s = k
m.t = j
m.o = i
m.y = c
a.u = f
a.p = k
a.v = j
j.u = c
j.o = c
j.v = k
j.t = k
j.w = m
k.q = l
f.q = c
f.r = k
f.z = k
f.o = j
c.z = k
i.q = c
i.r = k
i.z = k
i.o = j
l.q = c
l.r = k
l.z = k
l.o = j
assert c.z.q.o.w.t.v.q.txt == "l"