class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: H = None
        self.q: E = None
        self.x: D = None
        self.p: E = None
        self.u: F = None
        self.r: F = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: G = None
        self.z: E = None
        self.x: E = None
        self.r: I = None
        self.p: E = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.y: I = None
        self.v: B = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: G = None
        self.u: G = None
        self.txt = txt

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

f.y = d
f.v = a
f.q = k
f.p = k
f.x = e
f.u = l
f.r = l
f.t = h
m.o = a
n.u = f
n.v = a
n.o = l
n.q = l
n.z = d
e.v = a
e.o = d
e.z = k
e.x = k
e.p = k
e.r = h
e.q = f
k.y = h
k.r = h
k.o = m
k.w = m
k.p = a
k.x = f
k.s = f
k.v = l
k.q = l
l.y = e
l.o = m
d.p = n
d.x = f
d.y = h
d.v = m
d.s = e
a.q = l
h.s = a
h.w = d
h.u = d
assert f.v.q.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: H = None
        self.q: E = None
        self.x: D = None
        self.p: E = None
        self.u: F = None
        self.r: F = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: G = None
        self.z: E = None
        self.x: E = None
        self.r: I = None
        self.p: E = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.y: I = None
        self.v: B = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: G = None
        self.u: G = None
        self.txt = txt

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

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