class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: D = None
        self.u: D = None
        self.q: E = None
        self.t: C = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.txt = txt

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

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

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

j = A("j")
n = B("n")
g = C("g")
k = D("k")
b = E("b")
a = F("a")
d = G("d")
m = H("m")
h = D("h")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: D = None
        self.u: D = None
        self.q: E = None
        self.t: C = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.txt = txt

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

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

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

j = A("j")
n = B("n")
g = C("g")
k = D("k")
b = E("b")
a = F("a")
d = G("d")
m = H("m")
h = D("h")

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