class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: E = None
        self.q: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: A = None
        self.x: I = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: A = None
        self.x: I = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

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

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

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