class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: H = None
        self.z: D = None
        self.s: F = None
        self.p: D = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: A = None
        self.o: G = None
        self.z: F = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: D = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: D = None
        self.p: G = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: A = None
        self.o: G = None
        self.z: F = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: D = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: D = None
        self.p: G = None
        self.x: F = None
        self.txt = txt

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

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