class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: J = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: H = None
        self.x: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: H = None
        self.z: F = None
        self.x: J = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: I = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: F = None
        self.r: B = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: J = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: D = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: B = None
        self.o: C = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: H = None
        self.x: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: H = None
        self.z: F = None
        self.x: J = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: I = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: F = None
        self.r: B = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: J = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: D = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: B = None
        self.o: C = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

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