class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: E = None
        self.x: E = None
        self.o: E = None
        self.w: G = None
        self.u: G = None
        self.y: G = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: E = None
        self.w: B = None
        self.p: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: I = None
        self.u: G = None
        self.w: E = None
        self.t: H = None
        self.z: G = None
        self.y: C = None
        self.v: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: F = None
        self.s: C = None
        self.w: H = None
        self.r: E = None
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: E = None
        self.w: B = None
        self.p: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: I = None
        self.u: G = None
        self.w: E = None
        self.t: H = None
        self.z: G = None
        self.y: C = None
        self.v: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: F = None
        self.s: C = None
        self.w: H = None
        self.r: E = None
        self.p: G = None
        self.txt = txt

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

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