class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: G = None
        self.s: B = None
        self.v: D = None
        self.y: I = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: F = None
        self.r: D = None
        self.w: A = None
        self.o: E = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.y: H = None
        self.q: G = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: I = None
        self.o: F = None
        self.v: D = None
        self.p: C = None
        self.r: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.v: C = None
        self.z: B = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: F = None
        self.r: D = None
        self.w: A = None
        self.o: E = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.y: H = None
        self.q: G = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: I = None
        self.o: F = None
        self.v: D = None
        self.p: C = None
        self.r: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.v: C = None
        self.z: B = None
        self.w: D = None
        self.txt = txt

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

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