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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: I = None
        self.x: D = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: F = None
        self.y: A = None
        self.p: F = None
        self.u: E = None
        self.v: J = None
        self.r: C = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: B = None
        self.v: D = None
        self.t: C = None
        self.w: C = None
        self.p: H = None
        self.z: C = None
        self.u: C = None
        self.txt = txt

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

b.z = l
b.s = n
b.t = g
i.w = c
m.s = f
m.t = k
m.p = k
m.x = c
c.y = l
c.x = k
e.r = m
f.y = i
f.x = i
f.v = i
f.r = e
f.w = c
f.o = b
f.s = b
f.z = l
n.u = c
n.t = i
n.o = i
n.r = f
n.q = f
n.w = e
n.p = k
n.x = l
l.v = c
l.p = c
l.y = b
l.z = k
l.o = i
k.o = l
k.t = f
k.p = f
k.y = b
k.u = e
k.v = g
k.r = m
k.x = c
g.r = b
g.o = i
g.v = c
g.t = m
g.w = m
g.z = m
g.u = m
g.p = l
assert n.p.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: G = None
        self.t: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: I = None
        self.x: D = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: F = None
        self.y: A = None
        self.p: F = None
        self.u: E = None
        self.v: J = None
        self.r: C = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: B = None
        self.v: D = None
        self.t: C = None
        self.w: C = None
        self.p: H = None
        self.z: C = None
        self.u: C = None
        self.txt = txt

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

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