class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: F = None
        self.q: B = None
        self.x: E = None
        self.s: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: I = None
        self.q: F = None
        self.t: E = None
        self.v: F = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: B = None
        self.q: E = None
        self.r: I = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: I = None
        self.q: F = None
        self.t: E = None
        self.v: F = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: B = None
        self.q: E = None
        self.r: I = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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