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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.u: A = None
        self.txt = txt

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

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

k.x = e
k.u = i
g.v = e
g.y = k
g.o = j
e.x = d
d.v = e
d.t = i
d.u = k
l.u = j
l.s = i
l.v = k
m.v = e
m.t = l
m.u = k
i.u = d
i.s = l
i.v = k
h.u = m
h.s = l
h.v = k
j.v = e
j.t = i
j.u = k
assert k.u.s.v.x.txt == "e"