class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: B = None
        self.u: D = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

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