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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: I = None
        self.q: G = None
        self.y: E = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.t: I = None
        self.s: I = None
        self.x: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.t: E = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: I = None
        self.q: G = None
        self.y: E = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.t: I = None
        self.s: I = None
        self.x: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.t: E = None
        self.p: B = None
        self.txt = txt

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

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