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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: H = None
        self.s: J = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: H = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: I = None
        self.y: F = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: C = None
        self.o: G = None
        self.z: G = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: H = None
        self.s: J = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: H = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: I = None
        self.y: F = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: C = None
        self.o: G = None
        self.z: G = None
        self.w: E = None
        self.txt = txt

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

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

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

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