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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.s: C = None
        self.y: H = None
        self.q: F = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: C = None
        self.s: I = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: F = None
        self.z: B = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.s: C = None
        self.y: H = None
        self.q: F = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: C = None
        self.s: I = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: F = None
        self.z: B = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

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