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

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

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

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

j = A("j")
n = B("n")
e = C("e")
g = D("g")
h = D("h")
f = A("f")
c = C("c")
i = A("i")
k = B("k")

j.u = n
j.s = h
j.w = i
j.x = g
n.o = k
e.y = i
e.o = c
e.t = k
g.p = c
g.z = e
g.o = e
g.t = k
h.p = c
h.z = c
h.o = c
h.t = n
f.u = n
f.s = g
f.w = j
f.x = h
c.y = i
c.o = e
c.t = k
i.u = n
i.s = g
i.w = f
i.x = h
k.o = n
assert c.y.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: D = None
        self.w: A = None
        self.x: D = None
        self.txt = txt

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

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

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

j = A("j")
n = B("n")
e = C("e")
g = D("g")
h = D("h")
f = A("f")
c = C("c")
i = A("i")
k = B("k")

j.u = n
j.s = h
j.w = i
j.x = g
n.o = k
e.y = i
e.o = c
e.t = k
g.p = c
g.z = e
g.o = e
g.t = k
h.p = c
h.z = c
h.o = c
h.t = n
f.u = n
f.s = g
f.w = j
f.x = h
c.y = i
c.o = e
c.t = k
i.u = n
i.s = g
i.w = f
i.x = h
k.o = n
assert c.y.s.z.txt == "e"