class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: D = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: A = None
        self.z: C = None
        self.o: I = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: A = None
        self.z: C = None
        self.o: I = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

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