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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.t: C = None
        self.s: E = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.t: C = None
        self.s: E = None
        self.y: C = None
        self.txt = txt

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

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