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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: J = None
        self.u: B = None
        self.w: D = None
        self.v: G = None
        self.x: I = None
        self.q: G = None
        self.y: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: I = None
        self.o: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: J = None
        self.u: B = None
        self.w: D = None
        self.v: G = None
        self.x: I = None
        self.q: G = None
        self.y: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: I = None
        self.o: E = None
        self.txt = txt

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

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