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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.v: A = None
        self.y: A = None
        self.t: G = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: H = None
        self.y: B = None
        self.o: B = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.w: G = None
        self.z: C = None
        self.r: B = None
        self.v: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: F = None
        self.z: H = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.r: C = None
        self.x: E = None
        self.y: A = None
        self.s: B = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.v: A = None
        self.y: A = None
        self.t: G = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: H = None
        self.y: B = None
        self.o: B = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.w: G = None
        self.z: C = None
        self.r: B = None
        self.v: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: F = None
        self.z: H = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.r: C = None
        self.x: E = None
        self.y: A = None
        self.s: B = None
        self.p: A = None
        self.txt = txt

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

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