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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: E = None
        self.x: H = None
        self.q: H = None
        self.y: F = None
        self.w: I = None
        self.u: E = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: D = None
        self.r: D = None
        self.t: A = None
        self.z: D = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.z: E = None
        self.s: A = None
        self.u: C = None
        self.r: A = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: E = None
        self.x: H = None
        self.q: H = None
        self.y: F = None
        self.w: I = None
        self.u: E = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: D = None
        self.r: D = None
        self.t: A = None
        self.z: D = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.z: E = None
        self.s: A = None
        self.u: C = None
        self.r: A = None
        self.v: A = None
        self.txt = txt

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

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

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

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