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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.p: E = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: C = None
        self.q: I = None
        self.u: H = None
        self.t: D = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: B = None
        self.s: G = None
        self.o: A = None
        self.y: E = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.v: F = None
        self.u: E = None
        self.r: I = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.p: E = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: C = None
        self.q: I = None
        self.u: H = None
        self.t: D = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: B = None
        self.s: G = None
        self.o: A = None
        self.y: E = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.v: F = None
        self.u: E = None
        self.r: I = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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