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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: I = None
        self.v: I = None
        self.y: A = None
        self.z: I = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: G = None
        self.w: G = None
        self.y: H = None
        self.v: A = None
        self.q: A = None
        self.u: I = None
        self.o: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: F = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: I = None
        self.v: I = None
        self.y: A = None
        self.z: I = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: G = None
        self.w: G = None
        self.y: H = None
        self.v: A = None
        self.q: A = None
        self.u: I = None
        self.o: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: F = None
        self.w: A = None
        self.txt = txt

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

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