class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: D = None
        self.q: B = None
        self.z: E = None
        self.r: I = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: C = None
        self.r: E = None
        self.p: H = None
        self.v: A = None
        self.s: G = None
        self.z: G = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: I = None
        self.p: C = None
        self.o: A = None
        self.v: I = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: C = None
        self.r: E = None
        self.p: H = None
        self.v: A = None
        self.s: G = None
        self.z: G = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: I = None
        self.p: C = None
        self.o: A = None
        self.v: I = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: H = None
        self.w: I = None
        self.txt = txt

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

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

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