class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: F = None
        self.w: E = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: D = None
        self.w: E = None
        self.u: D = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: C = None
        self.t: C = None
        self.w: G = None
        self.o: G = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: D = None
        self.w: E = None
        self.u: D = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: C = None
        self.t: C = None
        self.w: G = None
        self.o: G = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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