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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: A = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: E = None
        self.p: H = None
        self.q: H = None
        self.u: H = None
        self.r: F = None
        self.t: F = None
        self.y: F = None
        self.o: J = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: F = None
        self.p: H = None
        self.r: C = None
        self.x: A = None
        self.y: H = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: F = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: A = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: E = None
        self.p: H = None
        self.q: H = None
        self.u: H = None
        self.r: F = None
        self.t: F = None
        self.y: F = None
        self.o: J = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: F = None
        self.p: H = None
        self.r: C = None
        self.x: A = None
        self.y: H = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: F = None
        self.x: A = None
        self.q: E = None
        self.txt = txt

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

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