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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: G = None
        self.y: D = None
        self.t: I = None
        self.x: G = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.t: E = None
        self.s: I = None
        self.v: B = None
        self.q: B = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: A = None
        self.w: C = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: C = None
        self.o: E = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: A = None
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: G = None
        self.y: D = None
        self.t: I = None
        self.x: G = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.t: E = None
        self.s: I = None
        self.v: B = None
        self.q: B = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: A = None
        self.w: C = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: C = None
        self.o: E = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: A = None
        self.t: H = None
        self.txt = txt

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

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