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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.q: C = None
        self.x: F = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.p: A = None
        self.w: J = None
        self.r: G = None
        self.t: J = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: D = None
        self.p: J = None
        self.x: G = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: J = None
        self.z: C = None
        self.y: C = None
        self.w: H = None
        self.s: G = None
        self.r: F = None
        self.v: G = None
        self.p: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.q: C = None
        self.x: F = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.p: A = None
        self.w: J = None
        self.r: G = None
        self.t: J = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: D = None
        self.p: J = None
        self.x: G = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: J = None
        self.z: C = None
        self.y: C = None
        self.w: H = None
        self.s: G = None
        self.r: F = None
        self.v: G = None
        self.p: H = None
        self.txt = txt

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

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

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