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

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

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

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

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

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

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

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

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

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

e.y = j
e.v = d
e.s = d
e.t = k
j.y = k
a.w = j
l.z = e
l.t = h
l.w = f
h.w = j
m.w = j
k.y = j
d.y = j
d.t = j
d.v = e
d.s = e
i.z = e
i.t = m
i.w = l
f.z = d
f.t = a
f.w = l
assert f.z.y.y.txt == "k"