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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: J = None
        self.x: C = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: D = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.y: A = None
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: F = None
        self.u: B = None
        self.t: D = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: J = None
        self.x: C = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: D = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.y: A = None
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: F = None
        self.u: B = None
        self.t: D = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: H = None
        self.txt = txt

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

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