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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

i = A("i")
e = B("e")
c = C("c")
h = D("h")
b = D("b")
l = B("l")
m = A("m")
d = B("d")
k = B("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

i = A("i")
e = B("e")
c = C("c")
h = D("h")
b = D("b")
l = B("l")
m = A("m")
d = B("d")
k = B("k")

i.t = d
i.s = b
i.w = c
i.v = c
e.r = b
e.t = h
e.s = m
c.t = b
c.y = b
h.u = c
h.r = l
h.y = e
h.p = m
b.u = c
b.r = k
b.y = l
b.p = i
l.r = h
l.t = b
l.s = m
m.t = k
m.s = b
m.w = c
m.v = c
d.r = h
d.t = h
d.s = i
k.r = h
k.t = b
k.s = i
assert e.s.t.s.v.txt == "c"