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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: F = None
        self.z: H = None
        self.t: E = None
        self.s: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: F = None
        self.z: H = None
        self.t: E = None
        self.s: H = None
        self.txt = txt

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

h.y = b
h.s = b
h.r = b
h.t = i
h.w = g
h.p = e
h.v = k
k.z = b
k.y = b
k.v = j
k.r = e
k.w = l
k.q = l
k.p = g
k.t = g
k.o = i
e.u = g
e.q = g
g.z = l
g.o = l
g.w = e
g.v = j
g.u = j
g.q = h
l.q = i
m.s = i
m.v = b
j.w = l
j.p = e
j.u = e
j.z = k
j.s = g
j.t = i
b.o = g
i.q = b
i.z = b
i.s = b
i.w = m
i.t = l
assert k.y.o.q.v.v.z.txt == "k"