class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: C = None
        self.w: D = None
        self.u: D = None
        self.y: D = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: F = None
        self.z: A = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.u: G = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: F = None
        self.z: A = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.u: G = None
        self.q: E = None
        self.txt = txt

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

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