class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: B = None
        self.s: G = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: A = None
        self.w: A = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.z: H = None
        self.y: F = None
        self.u: D = None
        self.o: B = None
        self.q: B = None
        self.r: H = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: A = None
        self.s: C = None
        self.u: J = None
        self.o: A = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: I = None
        self.q: C = None
        self.x: E = None
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: I = None
        self.u: G = None
        self.p: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: B = None
        self.s: G = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: A = None
        self.w: A = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.z: H = None
        self.y: F = None
        self.u: D = None
        self.o: B = None
        self.q: B = None
        self.r: H = None
        self.t: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: A = None
        self.s: C = None
        self.u: J = None
        self.o: A = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: I = None
        self.q: C = None
        self.x: E = None
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: I = None
        self.u: G = None
        self.p: G = None
        self.txt = txt

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

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