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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: B = None
        self.o: E = None
        self.q: D = None
        self.txt = txt

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

i.v = f
i.s = g
i.q = e
e.q = j
e.y = j
e.v = m
e.t = g
e.s = i
f.q = g
f.w = g
f.t = j
f.z = m
g.p = c
g.v = c
g.s = m
b.w = i
b.z = e
b.o = j
b.q = g
m.q = g
m.w = g
m.t = j
m.z = f
j.w = i
j.z = e
j.o = b
j.q = g
c.v = m
c.s = g
c.q = e
assert b.q.v.q.q.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: D = None
        self.q: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: B = None
        self.o: E = None
        self.q: D = None
        self.txt = txt

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

i.v = f
i.s = g
i.q = e
e.q = j
e.y = j
e.v = m
e.t = g
e.s = i
f.q = g
f.w = g
f.t = j
f.z = m
g.p = c
g.v = c
g.s = m
b.w = i
b.z = e
b.o = j
b.q = g
m.q = g
m.w = g
m.t = j
m.z = f
j.w = i
j.z = e
j.o = b
j.q = g
c.v = m
c.s = g
c.q = e
assert b.q.v.q.q.o.z.txt == "e"