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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: A = None
        self.q: D = None
        self.v: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: A = None
        self.q: B = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: B = None
        self.w: C = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

m = A("m")
k = B("k")
a = C("a")
j = D("j")
n = E("n")
h = B("h")
i = B("i")
d = A("d")

m.u = j
m.s = j
m.y = j
m.p = a
m.x = h
k.s = n
k.v = i
k.u = j
k.x = a
a.w = d
a.u = d
a.q = j
a.v = j
a.r = j
j.u = a
j.y = m
j.q = k
j.w = d
n.p = k
n.o = k
n.v = h
n.w = a
n.u = m
h.s = n
h.v = i
h.u = j
h.x = a
i.s = n
i.v = k
i.u = j
i.x = a
d.u = j
d.s = j
d.y = j
d.p = a
d.x = k
assert h.u.y.p.u.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: C = None
        self.s: D = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: A = None
        self.q: D = None
        self.v: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: A = None
        self.q: B = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: B = None
        self.w: C = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

m = A("m")
k = B("k")
a = C("a")
j = D("j")
n = E("n")
h = B("h")
i = B("i")
d = A("d")

m.u = j
m.s = j
m.y = j
m.p = a
m.x = h
k.s = n
k.v = i
k.u = j
k.x = a
a.w = d
a.u = d
a.q = j
a.v = j
a.r = j
j.u = a
j.y = m
j.q = k
j.w = d
n.p = k
n.o = k
n.v = h
n.w = a
n.u = m
h.s = n
h.v = i
h.u = j
h.x = a
i.s = n
i.v = k
i.u = j
i.x = a
d.u = j
d.s = j
d.y = j
d.p = a
d.x = k
assert h.u.y.p.u.x.u.txt == "j"