class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.q: F = None
        self.p: H = None
        self.z: H = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: A = None
        self.w: F = None
        self.x: H = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: E = None
        self.z: G = None
        self.p: H = None
        self.v: B = None
        self.w: F = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: E = None
        self.v: A = None
        self.w: H = None
        self.x: E = None
        self.y: G = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: G = None
        self.w: G = None
        self.o: E = None
        self.r: B = None
        self.z: C = None
        self.y: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: A = None
        self.w: F = None
        self.x: H = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: E = None
        self.z: G = None
        self.p: H = None
        self.v: B = None
        self.w: F = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: E = None
        self.v: A = None
        self.w: H = None
        self.x: E = None
        self.y: G = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: G = None
        self.w: G = None
        self.o: E = None
        self.r: B = None
        self.z: C = None
        self.y: F = None
        self.txt = txt

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

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