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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: I = None
        self.x: A = None
        self.r: E = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: C = None
        self.z: C = None
        self.o: A = None
        self.v: E = None
        self.p: J = None
        self.r: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: H = None
        self.q: A = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: I = None
        self.x: A = None
        self.r: E = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: C = None
        self.z: C = None
        self.o: A = None
        self.v: E = None
        self.p: J = None
        self.r: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: H = None
        self.q: A = None
        self.y: B = None
        self.txt = txt

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

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