class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: C = None
        self.p: B = None
        self.u: G = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: I = None
        self.r: B = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: I = None
        self.x: C = None
        self.r: I = None
        self.u: C = None
        self.v: D = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.t: I = None
        self.y: E = None
        self.q: F = None
        self.v: D = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: I = None
        self.q: H = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: D = None
        self.p: C = None
        self.r: A = None
        self.o: G = None
        self.y: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: I = None
        self.r: B = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: I = None
        self.x: C = None
        self.r: I = None
        self.u: C = None
        self.v: D = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.t: I = None
        self.y: E = None
        self.q: F = None
        self.v: D = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: I = None
        self.q: H = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: D = None
        self.p: C = None
        self.r: A = None
        self.o: G = None
        self.y: E = None
        self.txt = txt

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

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

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