class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: F = None
        self.t: H = None
        self.v: H = None
        self.x: B = None
        self.y: B = None
        self.r: H = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.r: C = None
        self.p: D = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: A = None
        self.w: B = None
        self.v: D = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: I = None
        self.q: I = None
        self.x: D = None
        self.z: I = None
        self.p: C = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: G = None
        self.z: D = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.s: G = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.r: C = None
        self.p: D = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: A = None
        self.w: B = None
        self.v: D = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: I = None
        self.q: I = None
        self.x: D = None
        self.z: I = None
        self.p: C = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: G = None
        self.z: D = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.s: G = None
        self.v: F = None
        self.txt = txt

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

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