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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: A = None
        self.z: B = None
        self.x: A = None
        self.r: A = None
        self.w: C = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: A = None
        self.z: B = None
        self.x: A = None
        self.r: A = None
        self.w: C = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: F = None
        self.txt = txt

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

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