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

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

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

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

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

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

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

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

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

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

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

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

i.w = d
i.s = f
i.y = j
h.v = i
h.u = i
h.s = a
h.q = c
j.q = n
j.t = c
j.v = e
j.w = i
j.p = f
n.x = e
n.q = e
n.u = a
c.p = h
c.z = i
c.s = e
k.p = f
k.z = i
k.s = e
e.q = n
e.t = k
e.v = j
e.w = i
e.p = h
d.x = j
d.u = a
d.q = e
f.v = i
f.u = i
f.s = c
f.q = c
a.p = f
a.z = i
a.s = e
assert n.q.v.w.txt == "i"