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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.s: C = None
        self.w: E = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: D = None
        self.r: F = None
        self.o: H = None
        self.t: B = None
        self.x: F = None
        self.q: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: E = None
        self.o: C = None
        self.q: B = None
        self.w: B = None
        self.r: F = None
        self.y: C = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.s: C = None
        self.w: E = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: D = None
        self.r: F = None
        self.o: H = None
        self.t: B = None
        self.x: F = None
        self.q: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: E = None
        self.o: C = None
        self.q: B = None
        self.w: B = None
        self.r: F = None
        self.y: C = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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