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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: F = None
        self.x: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: E = None
        self.u: A = None
        self.s: H = None
        self.w: E = None
        self.o: I = None
        self.y: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.q: E = None
        self.z: C = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: E = None
        self.r: C = None
        self.y: F = None
        self.u: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: E = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: F = None
        self.x: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: E = None
        self.u: A = None
        self.s: H = None
        self.w: E = None
        self.o: I = None
        self.y: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.q: E = None
        self.z: C = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: E = None
        self.r: C = None
        self.y: F = None
        self.u: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: E = None
        self.q: C = None
        self.txt = txt

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

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