class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: H = None
        self.z: B = None
        self.x: H = None
        self.r: I = None
        self.s: I = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: I = None
        self.r: D = None
        self.q: F = None
        self.p: A = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: A = None
        self.q: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: C = None
        self.y: H = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: B = None
        self.v: H = None
        self.w: D = None
        self.t: H = None
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: H = None
        self.w: D = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: I = None
        self.r: D = None
        self.q: F = None
        self.p: A = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: A = None
        self.q: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: C = None
        self.y: H = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: B = None
        self.v: H = None
        self.w: D = None
        self.t: H = None
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: H = None
        self.w: D = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

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

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