class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: B = None
        self.v: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.r: B = None
        self.q: C = None
        self.t: G = None
        self.p: E = None
        self.w: A = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.p: H = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.r: B = None
        self.q: C = None
        self.t: G = None
        self.p: E = None
        self.w: A = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.p: H = None
        self.r: H = None
        self.txt = txt

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

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

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

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