class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: F = None
        self.s: G = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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