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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: I = None
        self.p: G = None
        self.s: F = None
        self.w: C = None
        self.q: H = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: B = None
        self.p: D = None
        self.o: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: C = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: E = None
        self.o: G = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: G = None
        self.s: A = None
        self.p: C = None
        self.y: D = None
        self.o: A = None
        self.z: D = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: I = None
        self.p: G = None
        self.s: F = None
        self.w: C = None
        self.q: H = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: B = None
        self.p: D = None
        self.o: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: C = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: E = None
        self.o: G = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: G = None
        self.s: A = None
        self.p: C = None
        self.y: D = None
        self.o: A = None
        self.z: D = None
        self.r: C = None
        self.txt = txt

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

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