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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: F = None
        self.v: I = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: F = None
        self.v: I = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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