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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.q: I = None
        self.w: G = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.t: H = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.y: I = None
        self.o: C = None
        self.x: B = None
        self.u: I = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: D = None
        self.v: B = None
        self.q: G = None
        self.y: H = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.q: I = None
        self.w: G = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: G = None
        self.t: H = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.y: I = None
        self.o: C = None
        self.x: B = None
        self.u: I = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: D = None
        self.v: B = None
        self.q: G = None
        self.y: H = None
        self.x: B = None
        self.txt = txt

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

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