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

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

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

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