class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: G = None
        self.x: C = None
        self.q: E = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: B = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: D = None
        self.w: B = None
        self.y: C = None
        self.p: B = None
        self.o: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: H = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: B = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: D = None
        self.w: B = None
        self.y: C = None
        self.p: B = None
        self.o: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: H = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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