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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: E = None
        self.o: A = None
        self.s: F = None
        self.z: H = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: E = None
        self.z: E = None
        self.t: I = None
        self.p: A = None
        self.q: A = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.y: G = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: E = None
        self.r: G = None
        self.v: C = None
        self.z: E = None
        self.y: B = None
        self.o: C = None
        self.s: E = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: E = None
        self.o: A = None
        self.s: F = None
        self.z: H = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: E = None
        self.z: E = None
        self.t: I = None
        self.p: A = None
        self.q: A = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.y: G = None
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: E = None
        self.r: G = None
        self.v: C = None
        self.z: E = None
        self.y: B = None
        self.o: C = None
        self.s: E = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

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

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