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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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