class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: C = None
        self.v: G = None
        self.s: C = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: F = None
        self.x: E = None
        self.z: I = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: G = None
        self.q: I = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: F = None
        self.x: E = None
        self.z: I = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: G = None
        self.q: I = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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