class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: C = None
        self.z: C = None
        self.x: G = None
        self.y: D = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: H = None
        self.s: A = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: B = None
        self.o: C = None
        self.z: B = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: H = None
        self.s: A = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: B = None
        self.o: C = None
        self.z: B = None
        self.q: A = None
        self.txt = txt

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

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