class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: F = None
        self.v: I = None
        self.t: I = None
        self.q: A = None
        self.y: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: D = None
        self.v: H = None
        self.y: B = None
        self.q: B = None
        self.z: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: F = None
        self.v: I = None
        self.t: I = None
        self.q: A = None
        self.y: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: D = None
        self.v: H = None
        self.y: B = None
        self.q: B = None
        self.z: B = None
        self.txt = txt

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

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