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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.r: G = None
        self.y: H = None
        self.s: D = None
        self.x: I = None
        self.w: F = None
        self.t: F = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: A = None
        self.w: A = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: B = None
        self.r: A = None
        self.t: F = None
        self.y: F = None
        self.p: F = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: H = None
        self.v: H = None
        self.x: C = None
        self.o: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.r: G = None
        self.y: H = None
        self.s: D = None
        self.x: I = None
        self.w: F = None
        self.t: F = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: A = None
        self.w: A = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: B = None
        self.r: A = None
        self.t: F = None
        self.y: F = None
        self.p: F = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: H = None
        self.v: H = None
        self.x: C = None
        self.o: G = None
        self.txt = txt

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

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