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

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: B = None
        self.o: D = None
        self.t: E = None
        self.q: D = None
        self.p: B = None
        self.w: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: H = None
        self.x: H = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: F = None
        self.p: C = None
        self.v: I = None
        self.s: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: G = None
        self.p: E = None
        self.x: C = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: B = None
        self.o: D = None
        self.t: E = None
        self.q: D = None
        self.p: B = None
        self.w: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: H = None
        self.x: H = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: F = None
        self.p: C = None
        self.v: I = None
        self.s: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: G = None
        self.p: E = None
        self.x: C = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.p: C = None
        self.txt = txt

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

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