class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: C = None
        self.v: C = None
        self.x: E = None
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: C = None
        self.w: B = None
        self.p: E = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: D = None
        self.w: B = None
        self.x: D = None
        self.p: E = None
        self.txt = txt

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

h.z = l
h.p = c
h.v = c
h.w = c
h.x = k
m.q = a
m.y = a
m.t = a
m.u = h
m.o = n
c.r = l
j.r = k
j.y = d
j.w = m
j.p = n
j.v = a
k.t = l
k.v = l
k.x = l
k.w = m
k.p = n
d.r = l
a.q = m
a.y = m
a.t = m
a.u = h
a.o = k
n.t = j
n.v = l
n.x = l
n.w = m
n.p = k
b.r = l
l.r = k
l.p = k
l.y = d
l.w = a
l.v = m
assert l.y.r.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: C = None
        self.v: C = None
        self.x: E = None
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: C = None
        self.w: B = None
        self.p: E = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: D = None
        self.w: B = None
        self.x: D = None
        self.p: E = None
        self.txt = txt

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

h.z = l
h.p = c
h.v = c
h.w = c
h.x = k
m.q = a
m.y = a
m.t = a
m.u = h
m.o = n
c.r = l
j.r = k
j.y = d
j.w = m
j.p = n
j.v = a
k.t = l
k.v = l
k.x = l
k.w = m
k.p = n
d.r = l
a.q = m
a.y = m
a.t = m
a.u = h
a.o = k
n.t = j
n.v = l
n.x = l
n.w = m
n.p = k
b.r = l
l.r = k
l.p = k
l.y = d
l.w = a
l.v = m
assert l.y.r.w.t.txt == "m"