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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: C = None
        self.x: I = None
        self.z: E = None
        self.y: D = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: C = None
        self.t: C = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.t: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: C = None
        self.x: I = None
        self.z: E = None
        self.y: D = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: C = None
        self.t: C = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.t: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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