class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: A = None
        self.r: D = None
        self.u: C = None
        self.t: E = None
        self.q: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: H = None
        self.t: D = None
        self.u: D = None
        self.p: A = None
        self.x: I = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: C = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: E = None
        self.s: A = None
        self.o: C = None
        self.w: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: A = None
        self.r: D = None
        self.u: C = None
        self.t: E = None
        self.q: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: H = None
        self.t: D = None
        self.u: D = None
        self.p: A = None
        self.x: I = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: C = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: E = None
        self.s: A = None
        self.o: C = None
        self.w: D = None
        self.txt = txt

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

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

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