class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: H = None
        self.r: D = None
        self.x: D = None
        self.u: D = None
        self.p: F = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: B = None
        self.p: D = None
        self.r: G = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: B = None
        self.p: D = None
        self.r: G = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

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

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