class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.t: A = None
        self.x: C = None
        self.s: A = None
        self.txt = txt

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

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

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

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

h = A("h")
i = B("i")
d = C("d")
l = D("l")
n = E("n")
m = B("m")
c = B("c")
f = E("f")
j = A("j")
e = D("e")

h.w = j
h.q = j
h.t = j
h.s = j
h.x = d
i.u = e
i.v = l
i.y = d
i.w = j
i.o = n
d.p = n
d.s = j
d.w = l
d.r = i
l.s = n
l.v = n
l.z = i
n.q = l
n.z = f
n.u = f
n.o = f
m.u = l
m.v = l
m.y = d
m.w = h
m.o = n
c.u = e
c.v = e
c.y = d
c.w = j
c.o = n
f.q = l
f.z = n
f.u = n
f.o = n
j.w = h
j.q = h
j.t = h
j.s = h
j.x = d
e.s = n
e.v = f
e.z = m
assert d.s.x.w.s.q.s.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.t: A = None
        self.x: C = None
        self.s: A = None
        self.txt = txt

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

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

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

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

h = A("h")
i = B("i")
d = C("d")
l = D("l")
n = E("n")
m = B("m")
c = B("c")
f = E("f")
j = A("j")
e = D("e")

h.w = j
h.q = j
h.t = j
h.s = j
h.x = d
i.u = e
i.v = l
i.y = d
i.w = j
i.o = n
d.p = n
d.s = j
d.w = l
d.r = i
l.s = n
l.v = n
l.z = i
n.q = l
n.z = f
n.u = f
n.o = f
m.u = l
m.v = l
m.y = d
m.w = h
m.o = n
c.u = e
c.v = e
c.y = d
c.w = j
c.o = n
f.q = l
f.z = n
f.u = n
f.o = n
j.w = h
j.q = h
j.t = h
j.s = h
j.x = d
e.s = n
e.v = f
e.z = m
assert d.s.x.w.s.q.s.q.z.txt == "i"