class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: F = None
        self.o: F = None
        self.v: G = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: J = None
        self.v: B = None
        self.x: I = None
        self.z: J = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: H = None
        self.p: H = None
        self.v: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: G = None
        self.w: B = None
        self.y: H = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: F = None
        self.u: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: H = None
        self.o: J = None
        self.t: D = None
        self.y: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: I = None
        self.t: H = None
        self.o: B = None
        self.r: B = None
        self.x: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: J = None
        self.v: B = None
        self.x: I = None
        self.z: J = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: H = None
        self.p: H = None
        self.v: H = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: G = None
        self.w: B = None
        self.y: H = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: F = None
        self.u: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: H = None
        self.o: J = None
        self.t: D = None
        self.y: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: I = None
        self.t: H = None
        self.o: B = None
        self.r: B = None
        self.x: G = None
        self.txt = txt

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

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