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

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

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

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

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

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

k.s = b
k.u = b
k.r = j
k.q = n
l.v = d
l.r = b
l.y = n
c.o = d
c.x = d
c.v = g
c.y = g
n.v = d
n.q = a
n.t = k
a.q = l
a.p = l
a.y = k
a.z = h
b.v = d
b.r = l
b.y = n
g.s = l
g.r = j
g.q = n
g.u = b
h.q = l
h.p = b
h.y = k
h.z = a
j.o = c
j.x = c
j.v = g
j.y = k
d.o = c
d.x = c
d.v = g
d.y = k
assert g.q.v.v.q.v.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: C = None
        self.q: D = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

k.s = b
k.u = b
k.r = j
k.q = n
l.v = d
l.r = b
l.y = n
c.o = d
c.x = d
c.v = g
c.y = g
n.v = d
n.q = a
n.t = k
a.q = l
a.p = l
a.y = k
a.z = h
b.v = d
b.r = l
b.y = n
g.s = l
g.r = j
g.q = n
g.u = b
h.q = l
h.p = b
h.y = k
h.z = a
j.o = c
j.x = c
j.v = g
j.y = k
d.o = c
d.x = c
d.v = g
d.y = k
assert g.q.v.v.q.v.y.u.txt == "b"