class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: C = None
        self.o: B = None
        self.q: D = None
        self.w: B = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: H = None
        self.v: H = None
        self.s: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: H = None
        self.v: H = None
        self.s: I = None
        self.txt = txt

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

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