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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: C = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: F = None
        self.txt = txt

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

n = A("n")
d = B("d")
e = C("e")
j = D("j")
m = E("m")
l = F("l")
f = G("f")
k = H("k")
g = I("g")

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: C = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: F = None
        self.txt = txt

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

n = A("n")
d = B("d")
e = C("e")
j = D("j")
m = E("m")
l = F("l")
f = G("f")
k = H("k")
g = I("g")

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