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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: B = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.y: B = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.w: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: C = None
        self.r: B = None
        self.x: B = None
        self.o: D = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: B = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.y: B = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.w: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: C = None
        self.r: B = None
        self.x: B = None
        self.o: D = None
        self.y: F = None
        self.txt = txt

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

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