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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: F = None
        self.t: D = None
        self.q: C = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: F = None
        self.t: D = None
        self.q: C = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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