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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: I = None
        self.v: D = None
        self.o: I = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: E = None
        self.t: C = None
        self.p: D = None
        self.o: E = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.s: G = None
        self.u: G = None
        self.z: F = None
        self.y: F = None
        self.x: E = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: I = None
        self.v: D = None
        self.o: I = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: E = None
        self.t: C = None
        self.p: D = None
        self.o: E = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.s: G = None
        self.u: G = None
        self.z: F = None
        self.y: F = None
        self.x: E = None
        self.o: B = None
        self.txt = txt

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

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