class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: D = None
        self.z: C = None
        self.p: I = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: H = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: B = None
        self.x: H = None
        self.v: G = None
        self.s: G = None
        self.y: B = None
        self.u: F = None
        self.q: D = None
        self.t: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: D = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.p: B = None
        self.y: E = None
        self.r: D = None
        self.txt = txt

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

h = A("h")
j = B("j")
b = C("b")
k = D("k")
f = E("f")
m = F("m")
i = G("i")
l = H("l")
a = I("a")
c = E("c")

h.w = i
h.x = k
h.z = b
h.p = a
h.v = j
j.y = i
j.p = l
j.z = c
j.q = m
b.o = k
b.q = k
b.p = j
b.y = j
b.x = l
b.t = l
b.v = i
b.s = i
b.u = m
k.z = i
k.q = j
k.s = a
k.p = h
f.z = h
f.y = h
f.u = h
f.q = c
f.t = m
f.r = b
f.v = i
f.p = a
f.o = j
m.p = h
i.z = b
i.t = k
i.w = c
l.t = j
l.p = j
l.s = b
l.y = f
l.r = k
a.o = c
a.s = m
a.q = k
a.u = k
a.y = k
a.x = i
a.t = l
c.z = h
c.y = h
c.u = h
c.q = f
c.t = m
c.r = b
c.v = i
c.p = a
c.o = j
assert k.p.z.y.y.z.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: D = None
        self.z: C = None
        self.p: I = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: H = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: B = None
        self.x: H = None
        self.v: G = None
        self.s: G = None
        self.y: B = None
        self.u: F = None
        self.q: D = None
        self.t: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: D = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.p: B = None
        self.y: E = None
        self.r: D = None
        self.txt = txt

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

h = A("h")
j = B("j")
b = C("b")
k = D("k")
f = E("f")
m = F("m")
i = G("i")
l = H("l")
a = I("a")
c = E("c")

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