class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: D = None
        self.r: D = None
        self.y: H = None
        self.x: G = None
        self.o: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: D = None
        self.v: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: C = None
        self.u: D = None
        self.z: I = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: D = None
        self.w: E = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: D = None
        self.r: D = None
        self.y: H = None
        self.x: G = None
        self.o: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: D = None
        self.v: G = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: C = None
        self.u: D = None
        self.z: I = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: D = None
        self.w: E = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.txt = txt

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

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