class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: F = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: F = None
        self.w: I = None
        self.s: C = None
        self.q: F = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: I = None
        self.p: A = None
        self.o: E = None
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.r: E = None
        self.s: B = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: F = None
        self.w: I = None
        self.s: C = None
        self.q: F = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: I = None
        self.p: A = None
        self.o: E = None
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.r: E = None
        self.s: B = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.txt = txt

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

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