class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.q: G = None
        self.o: G = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.q: G = None
        self.o: G = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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