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

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

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

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

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

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

c.s = i
c.z = e
h.x = l
h.v = l
h.t = k
i.q = j
i.t = m
i.z = l
i.r = g
i.v = h
j.s = g
j.y = k
j.o = k
m.w = e
m.q = e
l.x = h
l.v = h
l.t = j
k.s = c
k.y = j
k.o = j
e.w = m
e.q = m
g.s = i
g.z = m
assert g.s.q.o.o.s.s.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

c.s = i
c.z = e
h.x = l
h.v = l
h.t = k
i.q = j
i.t = m
i.z = l
i.r = g
i.v = h
j.s = g
j.y = k
j.o = k
m.w = e
m.q = e
l.x = h
l.v = h
l.t = j
k.s = c
k.y = j
k.o = j
e.w = m
e.q = m
g.s = i
g.z = m
assert g.s.q.o.o.s.s.z.v.txt == "h"