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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.q: A = None
        self.o: B = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: G = None
        self.r: G = None
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.s: D = None
        self.x: H = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.q: A = None
        self.o: B = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: G = None
        self.r: G = None
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.s: D = None
        self.x: H = None
        self.r: B = None
        self.txt = txt

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

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