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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: E = None
        self.u: D = None
        self.y: G = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: B = None
        self.r: D = None
        self.u: H = None
        self.q: A = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: G = None
        self.z: G = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: E = None
        self.u: D = None
        self.y: G = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: B = None
        self.r: D = None
        self.u: H = None
        self.q: A = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: G = None
        self.z: G = None
        self.r: D = None
        self.txt = txt

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

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