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

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

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

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

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

j = A("j")
n = B("n")
c = C("c")
a = D("a")
e = E("e")
g = B("g")
l = C("l")
m = E("m")
k = C("k")

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

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

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

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

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

j = A("j")
n = B("n")
c = C("c")
a = D("a")
e = E("e")
g = B("g")
l = C("l")
m = E("m")
k = C("k")

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