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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: F = None
        self.s: H = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.t: D = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: E = None
        self.z: H = None
        self.u: E = None
        self.o: G = None
        self.y: A = None
        self.x: E = None
        self.txt = txt

e = A("e")
j = B("j")
i = C("i")
m = D("m")
b = E("b")
f = F("f")
g = G("g")
a = H("a")
h = H("h")

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: F = None
        self.s: H = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.t: D = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: E = None
        self.z: H = None
        self.u: E = None
        self.o: G = None
        self.y: A = None
        self.x: E = None
        self.txt = txt

e = A("e")
j = B("j")
i = C("i")
m = D("m")
b = E("b")
f = F("f")
g = G("g")
a = H("a")
h = H("h")

e.w = a
e.o = a
e.z = f
e.p = h
e.x = m
e.q = i
e.y = g
j.v = g
j.u = g
i.x = j
i.w = a
m.o = j
m.t = f
m.s = h
m.r = h
m.y = b
b.v = g
b.p = g
b.y = i
b.t = m
b.r = h
f.v = g
f.w = m
g.t = h
g.o = j
a.p = f
a.w = b
a.u = b
a.x = b
a.z = h
a.o = g
a.y = e
h.p = f
h.w = b
h.u = b
h.x = b
h.z = a
h.o = g
h.y = e
assert m.t.w.y.y.txt == "i"