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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

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

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