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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: H = None
        self.z: C = None
        self.t: J = None
        self.y: C = None
        self.s: A = None
        self.w: E = None
        self.p: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: D = None
        self.r: B = None
        self.u: F = None
        self.y: C = None
        self.p: C = None
        self.o: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: H = None
        self.z: C = None
        self.t: J = None
        self.y: C = None
        self.s: A = None
        self.w: E = None
        self.p: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: D = None
        self.r: B = None
        self.u: F = None
        self.y: C = None
        self.p: C = None
        self.o: A = None
        self.txt = txt

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

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

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