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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: J = None
        self.w: F = None
        self.o: H = None
        self.u: G = None
        self.r: H = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: H = None
        self.q: D = None
        self.p: F = None
        self.o: F = None
        self.y: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: J = None
        self.w: F = None
        self.o: H = None
        self.u: G = None
        self.r: H = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: H = None
        self.q: D = None
        self.p: F = None
        self.o: F = None
        self.y: E = None
        self.txt = txt

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

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

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