class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: H = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: I = None
        self.v: F = None
        self.o: A = None
        self.p: E = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: F = None
        self.t: G = None
        self.s: E = None
        self.r: E = None
        self.y: F = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: I = None
        self.v: F = None
        self.o: A = None
        self.p: E = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: F = None
        self.t: G = None
        self.s: E = None
        self.r: E = None
        self.y: F = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

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