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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: E = None
        self.x: A = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: E = None
        self.x: A = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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