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

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

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

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

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

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

c.s = h
c.r = j
c.u = e
c.x = b
e.w = h
b.z = n
b.v = d
l.t = d
f.u = j
f.v = j
f.t = k
f.r = e
f.q = c
n.u = k
n.t = k
n.v = j
n.r = e
n.q = h
k.u = j
k.t = j
k.v = j
k.r = e
k.q = h
d.t = l
j.u = n
j.v = n
j.t = f
j.r = e
j.q = h
h.s = c
h.r = n
h.u = e
h.x = b
assert n.q.u.w.r.v.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.u: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

c.s = h
c.r = j
c.u = e
c.x = b
e.w = h
b.z = n
b.v = d
l.t = d
f.u = j
f.v = j
f.t = k
f.r = e
f.q = c
n.u = k
n.t = k
n.v = j
n.r = e
n.q = h
k.u = j
k.t = j
k.v = j
k.r = e
k.q = h
d.t = l
j.u = n
j.v = n
j.t = f
j.r = e
j.q = h
h.s = c
h.r = n
h.u = e
h.x = b
assert n.q.u.w.r.v.r.w.txt == "h"