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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: A = None
        self.u: G = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: H = None
        self.q: A = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: G = None
        self.t: B = None
        self.v: E = None
        self.s: G = None
        self.q: E = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: F = None
        self.x: D = None
        self.q: A = None
        self.y: E = None
        self.o: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: E = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: A = None
        self.u: G = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: H = None
        self.q: A = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: G = None
        self.t: B = None
        self.v: E = None
        self.s: G = None
        self.q: E = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: F = None
        self.x: D = None
        self.q: A = None
        self.y: E = None
        self.o: H = None
        self.txt = txt

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

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