class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: H = None
        self.r: G = None
        self.t: D = None
        self.z: J = None
        self.u: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: F = None
        self.v: J = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: G = None
        self.u: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: F = None
        self.v: J = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: G = None
        self.u: E = None
        self.w: E = None
        self.txt = txt

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

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