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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: D = None
        self.s: E = None
        self.r: D = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: H = None
        self.t: B = None
        self.v: B = None
        self.s: B = None
        self.z: H = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: F = None
        self.txt = txt

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

j = A("j")
m = B("m")
h = C("h")
d = D("d")
n = E("n")
f = F("f")
b = G("b")
e = H("e")
a = I("a")

j.v = n
j.x = b
m.w = b
h.p = n
h.s = n
h.q = d
h.r = d
h.u = e
d.p = f
d.x = j
d.s = h
d.v = b
d.t = b
n.y = b
f.x = a
f.u = n
f.r = b
b.q = m
b.t = m
b.v = m
b.s = m
b.p = e
b.z = e
b.u = a
e.p = m
e.y = f
a.r = e
a.v = d
a.p = f
a.z = n
a.o = m
assert a.p.x.z.y.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: D = None
        self.s: E = None
        self.r: D = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: H = None
        self.t: B = None
        self.v: B = None
        self.s: B = None
        self.z: H = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: F = None
        self.txt = txt

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

j = A("j")
m = B("m")
h = C("h")
d = D("d")
n = E("n")
f = F("f")
b = G("b")
e = H("e")
a = I("a")

j.v = n
j.x = b
m.w = b
h.p = n
h.s = n
h.q = d
h.r = d
h.u = e
d.p = f
d.x = j
d.s = h
d.v = b
d.t = b
n.y = b
f.x = a
f.u = n
f.r = b
b.q = m
b.t = m
b.v = m
b.s = m
b.p = e
b.z = e
b.u = a
e.p = m
e.y = f
a.r = e
a.v = d
a.p = f
a.z = n
a.o = m
assert a.p.x.z.y.u.o.txt == "m"