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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.txt = txt

h = A("h")
b = B("b")
i = C("i")
c = D("c")
f = E("f")
k = C("k")
j = C("j")
a = E("a")
e = A("e")
d = D("d")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.txt = txt

h = A("h")
b = B("b")
i = C("i")
c = D("c")
f = E("f")
k = C("k")
j = C("j")
a = E("a")
e = A("e")
d = D("d")

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