class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: D = None
        self.o: H = None
        self.x: D = None
        self.z: B = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.q: H = None
        self.u: B = None
        self.y: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: I = None
        self.r: H = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: F = None
        self.z: D = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.q: H = None
        self.u: B = None
        self.y: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: I = None
        self.r: H = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: F = None
        self.z: D = None
        self.r: E = None
        self.txt = txt

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

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

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