class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: F = None
        self.x: B = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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