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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: A = None
        self.s: H = None
        self.w: A = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: H = None
        self.r: H = None
        self.s: I = None
        self.z: H = None
        self.v: E = None
        self.u: G = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: A = None
        self.w: F = None
        self.x: A = None
        self.y: E = None
        self.s: F = None
        self.q: H = None
        self.o: A = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.s: F = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: B = None
        self.o: G = None
        self.q: G = None
        self.t: C = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: A = None
        self.s: H = None
        self.w: A = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: H = None
        self.r: H = None
        self.s: I = None
        self.z: H = None
        self.v: E = None
        self.u: G = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: A = None
        self.w: F = None
        self.x: A = None
        self.y: E = None
        self.s: F = None
        self.q: H = None
        self.o: A = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.s: F = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: B = None
        self.o: G = None
        self.q: G = None
        self.t: C = None
        self.r: D = None
        self.txt = txt

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

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