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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: E = None
        self.s: B = None
        self.u: B = None
        self.x: H = None
        self.q: H = None
        self.w: D = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: G = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: E = None
        self.s: B = None
        self.u: B = None
        self.x: H = None
        self.q: H = None
        self.w: D = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: G = None
        self.v: D = None
        self.txt = txt

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

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

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