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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.y: A = None
        self.z: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: E = None
        self.v: G = None
        self.r: I = None
        self.x: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.y: A = None
        self.z: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: E = None
        self.v: G = None
        self.r: I = None
        self.x: I = None
        self.txt = txt

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

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

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

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

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