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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

e.q = a
e.s = j
e.z = j
e.x = c
a.v = b
a.w = e
j.o = a
m.w = c
m.t = a
m.p = h
m.u = j
m.q = j
h.r = j
h.q = j
h.u = g
h.v = a
c.q = a
c.s = j
c.z = j
c.x = e
b.w = e
b.t = a
b.p = h
b.u = j
b.q = j
g.q = a
g.s = j
g.z = j
g.x = e
assert e.x.z.o.v.w.s.o.v.txt == "b"