class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: I = None
        self.p: G = None
        self.u: F = None
        self.r: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: B = None
        self.y: B = None
        self.q: J = None
        self.u: I = None
        self.r: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: B = None
        self.y: B = None
        self.q: J = None
        self.u: I = None
        self.r: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

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