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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.x: D = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: I = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.x: D = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: I = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

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