class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.q: D = None
        self.z: G = None
        self.u: G = None
        self.t: D = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: I = None
        self.p: I = None
        self.t: A = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: E = None
        self.q: E = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: H = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: H = None
        self.r: H = None
        self.o: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: I = None
        self.p: I = None
        self.t: A = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: E = None
        self.q: E = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: H = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: H = None
        self.r: H = None
        self.o: D = None
        self.txt = txt

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

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