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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: B = None
        self.y: A = None
        self.x: G = None
        self.t: B = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: B = None
        self.o: D = None
        self.s: E = None
        self.r: C = None
        self.y: A = None
        self.u: E = None
        self.txt = txt

e = A("e")
g = B("g")
i = C("i")
l = D("l")
d = E("d")
b = F("b")
n = G("n")
h = B("h")
m = A("m")

e.o = l
e.z = g
e.q = n
g.x = n
g.q = h
g.t = h
g.w = m
g.v = d
g.z = l
i.v = b
i.u = g
i.p = h
i.q = e
l.q = e
l.z = d
d.t = h
d.x = i
d.v = i
d.s = m
d.z = g
b.z = l
b.r = h
b.y = e
b.x = n
b.v = n
b.t = g
n.w = d
n.s = d
n.u = d
n.z = h
n.o = l
n.r = i
n.y = e
h.x = n
h.q = g
h.t = g
h.w = m
h.v = d
h.z = l
m.o = l
m.z = g
m.q = n
assert h.z.q.z.x.r.q.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: B = None
        self.y: A = None
        self.x: G = None
        self.t: B = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: B = None
        self.o: D = None
        self.s: E = None
        self.r: C = None
        self.y: A = None
        self.u: E = None
        self.txt = txt

e = A("e")
g = B("g")
i = C("i")
l = D("l")
d = E("d")
b = F("b")
n = G("n")
h = B("h")
m = A("m")

e.o = l
e.z = g
e.q = n
g.x = n
g.q = h
g.t = h
g.w = m
g.v = d
g.z = l
i.v = b
i.u = g
i.p = h
i.q = e
l.q = e
l.z = d
d.t = h
d.x = i
d.v = i
d.s = m
d.z = g
b.z = l
b.r = h
b.y = e
b.x = n
b.v = n
b.t = g
n.w = d
n.s = d
n.u = d
n.z = h
n.o = l
n.r = i
n.y = e
h.x = n
h.q = g
h.t = g
h.w = m
h.v = d
h.z = l
m.o = l
m.z = g
m.q = n
assert h.z.q.z.x.r.q.z.v.txt == "d"