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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: A = None
        self.q: G = None
        self.r: H = None
        self.s: I = None
        self.o: G = None
        self.w: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: C = None
        self.u: B = None
        self.t: E = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: A = None
        self.q: G = None
        self.r: H = None
        self.s: I = None
        self.o: G = None
        self.w: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: C = None
        self.u: B = None
        self.t: E = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

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

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

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