class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: E = None
        self.x: E = None
        self.r: H = None
        self.p: C = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: I = None
        self.s: I = None
        self.v: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: B = None
        self.y: D = None
        self.p: G = None
        self.q: C = None
        self.x: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: I = None
        self.s: I = None
        self.v: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: B = None
        self.y: D = None
        self.p: G = None
        self.q: C = None
        self.x: G = None
        self.txt = txt

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

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