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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.p: G = None
        self.w: C = None
        self.v: C = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: A = None
        self.v: D = None
        self.x: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.p: G = None
        self.w: C = None
        self.v: C = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: A = None
        self.v: D = None
        self.x: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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