class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: I = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: C = None
        self.t: J = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: B = None
        self.v: I = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: I = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: C = None
        self.t: J = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: B = None
        self.v: I = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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