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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: G = None
        self.o: J = None
        self.s: F = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.x: I = None
        self.r: F = None
        self.q: A = None
        self.w: A = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: B = None
        self.y: B = None
        self.r: J = None
        self.x: B = None
        self.v: E = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: G = None
        self.o: J = None
        self.s: F = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.x: I = None
        self.r: F = None
        self.q: A = None
        self.w: A = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: B = None
        self.y: B = None
        self.r: J = None
        self.x: B = None
        self.v: E = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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