class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: A = None
        self.q: C = None
        self.o: C = None
        self.y: D = None
        self.p: A = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: A = None
        self.q: C = None
        self.o: C = None
        self.y: D = None
        self.p: A = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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