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

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

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

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

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

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

f.r = c
f.x = e
f.o = h
f.s = h
f.v = n
c.q = f
a.r = i
a.v = h
i.s = h
i.w = e
i.v = n
i.r = g
h.q = f
h.x = n
h.v = g
h.p = c
h.u = a
j.r = g
j.v = n
g.s = h
g.v = h
g.w = a
g.r = i
m.r = c
m.x = e
m.o = n
m.s = n
m.v = h
e.r = i
e.v = h
n.q = m
n.x = h
n.v = i
n.p = c
n.u = a
assert n.u.r.r.w.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.o: E = None
        self.v: E = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

f.r = c
f.x = e
f.o = h
f.s = h
f.v = n
c.q = f
a.r = i
a.v = h
i.s = h
i.w = e
i.v = n
i.r = g
h.q = f
h.x = n
h.v = g
h.p = c
h.u = a
j.r = g
j.v = n
g.s = h
g.v = h
g.w = a
g.r = i
m.r = c
m.x = e
m.o = n
m.s = n
m.v = h
e.r = i
e.v = h
n.q = m
n.x = h
n.v = i
n.p = c
n.u = a
assert n.u.r.r.w.v.u.txt == "a"