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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.t: E = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: C = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.t: E = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: C = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: B = None
        self.txt = txt

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

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