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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.v: C = None
        self.u: B = None
        self.p: B = None
        self.q: C = None
        self.z: H = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.v: C = None
        self.u: B = None
        self.p: B = None
        self.q: C = None
        self.z: H = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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