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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.o: A = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: A = None
        self.x: B = None
        self.s: B = None
        self.t: A = None
        self.o: I = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: I = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: C = None
        self.o: G = None
        self.s: A = None
        self.q: E = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: E = None
        self.y: C = None
        self.u: D = None
        self.x: F = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: H = None
        self.o: A = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: A = None
        self.x: B = None
        self.s: B = None
        self.t: A = None
        self.o: I = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: I = None
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: C = None
        self.o: G = None
        self.s: A = None
        self.q: E = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: E = None
        self.y: C = None
        self.u: D = None
        self.x: F = None
        self.z: D = None
        self.txt = txt

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

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