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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: E = None
        self.u: H = None
        self.y: H = None
        self.t: E = None
        self.r: H = None
        self.p: F = None
        self.txt = txt

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

m = A("m")
h = B("h")
e = C("e")
l = D("l")
f = E("f")
d = F("d")
k = G("k")
b = H("b")
a = F("a")
j = A("j")

m.q = h
m.o = h
m.z = d
h.t = k
h.u = k
h.y = f
h.o = e
h.z = l
e.w = l
e.y = j
e.p = j
e.v = k
e.r = k
l.p = b
l.y = k
l.x = e
f.w = j
f.y = b
d.u = b
d.v = k
d.q = f
d.x = l
d.o = e
d.z = h
d.w = a
k.s = m
k.w = f
k.t = f
k.u = b
k.y = b
k.r = b
k.p = a
b.w = l
a.u = b
a.v = k
a.q = f
a.x = l
a.o = e
a.z = h
a.w = d
j.q = h
j.o = h
j.z = a
assert m.o.z.y.w.w.o.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: F = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: E = None
        self.u: H = None
        self.y: H = None
        self.t: E = None
        self.r: H = None
        self.p: F = None
        self.txt = txt

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

m = A("m")
h = B("h")
e = C("e")
l = D("l")
f = E("f")
d = F("d")
k = G("k")
b = H("b")
a = F("a")
j = A("j")

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