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

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

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

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

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

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

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

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

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

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

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