class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: A = None
        self.o: D = None
        self.r: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: C = None
        self.y: E = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

e = A("e")
h = B("h")
g = C("g")
n = D("n")
f = E("f")
l = A("l")
i = A("i")
j = A("j")
b = E("b")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: C = None
        self.y: E = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

e = A("e")
h = B("h")
g = C("g")
n = D("n")
f = E("f")
l = A("l")
i = A("i")
j = A("j")
b = E("b")

e.s = n
e.o = n
e.r = n
e.v = j
h.u = j
h.t = b
g.r = h
g.z = n
n.q = h
n.p = f
n.r = f
n.o = f
n.s = e
f.t = i
f.s = g
f.y = b
f.x = b
f.v = b
l.s = n
l.o = n
l.r = n
l.v = i
i.s = n
i.o = n
i.r = n
i.v = e
j.s = n
j.o = n
j.r = n
j.v = i
b.t = i
b.s = g
b.y = f
b.x = f
b.v = f
assert n.s.r.q.txt == "h"