class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: J = None
        self.s: D = None
        self.o: F = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.v: J = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: A = None
        self.w: J = None
        self.u: E = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: F = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: J = None
        self.s: D = None
        self.r: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.q: F = None
        self.v: D = None
        self.z: B = None
        self.t: H = None
        self.p: B = None
        self.x: F = None
        self.o: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.v: J = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: A = None
        self.w: J = None
        self.u: E = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: F = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: J = None
        self.s: D = None
        self.r: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.q: F = None
        self.v: D = None
        self.z: B = None
        self.t: H = None
        self.p: B = None
        self.x: F = None
        self.o: F = None
        self.txt = txt

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

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

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