class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: I = None
        self.o: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: H = None
        self.u: A = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.v: J = None
        self.r: I = None
        self.w: A = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: D = None
        self.x: E = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: I = None
        self.z: A = None
        self.p: C = None
        self.y: J = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: H = None
        self.u: A = None
        self.w: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.v: J = None
        self.r: I = None
        self.w: A = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: D = None
        self.x: E = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: I = None
        self.z: A = None
        self.p: C = None
        self.y: J = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

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