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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: D = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: I = None
        self.v: I = None
        self.o: C = None
        self.y: C = None
        self.u: F = None
        self.z: B = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.s: E = None
        self.o: A = None
        self.w: D = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.y: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: E = None
        self.w: F = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.v: A = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: D = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: I = None
        self.v: I = None
        self.o: C = None
        self.y: C = None
        self.u: F = None
        self.z: B = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.s: E = None
        self.o: A = None
        self.w: D = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: E = None
        self.y: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: E = None
        self.w: F = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.v: A = None
        self.z: B = None
        self.txt = txt

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

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