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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: G = None
        self.z: F = None
        self.q: H = None
        self.x: J = None
        self.u: J = None
        self.s: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: H = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: G = None
        self.z: F = None
        self.q: H = None
        self.x: J = None
        self.u: J = None
        self.s: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: H = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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