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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: C = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: I = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: C = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: I = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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