class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: F = None
        self.t: D = None
        self.x: I = None
        self.z: I = None
        self.p: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: B = None
        self.w: F = None
        self.o: E = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: B = None
        self.w: F = None
        self.u: E = None
        self.t: G = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: B = None
        self.w: F = None
        self.o: E = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: B = None
        self.w: F = None
        self.u: E = None
        self.t: G = None
        self.q: D = None
        self.txt = txt

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

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