class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: E = None
        self.o: I = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: H = None
        self.y: C = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: B = None
        self.t: D = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: H = None
        self.p: E = None
        self.s: C = None
        self.u: B = None
        self.y: D = None
        self.r: B = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: D = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: C = None
        self.r: B = None
        self.o: G = None
        self.x: G = None
        self.u: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: E = None
        self.o: I = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: H = None
        self.y: C = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: B = None
        self.t: D = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: H = None
        self.p: E = None
        self.s: C = None
        self.u: B = None
        self.y: D = None
        self.r: B = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: D = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: C = None
        self.r: B = None
        self.o: G = None
        self.x: G = None
        self.u: C = None
        self.p: B = None
        self.txt = txt

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

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

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