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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.z: B = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.x: B = None
        self.o: E = None
        self.u: I = None
        self.v: H = None
        self.z: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: A = None
        self.z: B = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.x: B = None
        self.o: E = None
        self.u: I = None
        self.v: H = None
        self.z: I = None
        self.txt = txt

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

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

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

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