class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: I = None
        self.r: A = None
        self.t: J = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.u: H = None
        self.x: D = None
        self.z: B = None
        self.t: B = None
        self.p: I = None
        self.v: H = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: I = None
        self.r: A = None
        self.t: J = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.u: H = None
        self.x: D = None
        self.z: B = None
        self.t: B = None
        self.p: I = None
        self.v: H = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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