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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.q: A = None
        self.p: D = None
        self.s: D = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: H = None
        self.p: F = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: I = None
        self.y: A = None
        self.t: G = None
        self.r: A = None
        self.u: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.q: A = None
        self.p: D = None
        self.s: D = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: H = None
        self.p: F = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: I = None
        self.y: A = None
        self.t: G = None
        self.r: A = None
        self.u: F = None
        self.txt = txt

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

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