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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: I = None
        self.o: D = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: B = None
        self.q: F = None
        self.w: E = None
        self.v: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: G = None
        self.z: C = None
        self.y: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: D = None
        self.o: G = None
        self.s: E = None
        self.u: C = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: I = None
        self.o: D = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: B = None
        self.q: F = None
        self.w: E = None
        self.v: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: G = None
        self.z: C = None
        self.y: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: D = None
        self.o: G = None
        self.s: E = None
        self.u: C = None
        self.z: A = None
        self.txt = txt

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

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