class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.u: C = None
        self.p: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.w: G = None
        self.z: D = None
        self.r: C = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: B = None
        self.o: D = None
        self.y: D = None
        self.z: H = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: H = None
        self.w: G = None
        self.z: D = None
        self.r: C = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: A = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: B = None
        self.o: D = None
        self.y: D = None
        self.z: H = None
        self.u: D = None
        self.txt = txt

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

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