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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: F = None
        self.s: C = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: C = None
        self.p: G = None
        self.x: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: F = None
        self.s: C = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: C = None
        self.p: G = None
        self.x: B = None
        self.z: D = None
        self.txt = txt

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

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