class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: B = None
        self.u: C = None
        self.z: C = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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

l = A("l")
h = B("h")
j = C("j")
k = D("k")
b = E("b")
g = F("g")
n = F("n")
e = C("e")
a = A("a")

l.v = n
l.y = h
l.o = h
l.u = j
l.z = e
h.p = b
h.x = b
h.o = k
j.z = n
k.x = e
b.t = l
b.z = e
b.y = n
b.x = j
b.u = k
b.s = k
g.q = l
g.s = a
g.y = h
g.o = h
n.q = l
n.s = a
n.y = h
n.o = h
e.z = n
a.v = g
a.y = h
a.o = h
a.u = j
a.z = j
assert j.z.s.o.x.x.z.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: B = None
        self.u: C = None
        self.z: C = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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

l = A("l")
h = B("h")
j = C("j")
k = D("k")
b = E("b")
g = F("g")
n = F("n")
e = C("e")
a = A("a")

l.v = n
l.y = h
l.o = h
l.u = j
l.z = e
h.p = b
h.x = b
h.o = k
j.z = n
k.x = e
b.t = l
b.z = e
b.y = n
b.x = j
b.u = k
b.s = k
g.q = l
g.s = a
g.y = h
g.o = h
n.q = l
n.s = a
n.y = h
n.o = h
e.z = n
a.v = g
a.y = h
a.o = h
a.u = j
a.z = j
assert j.z.s.o.x.x.z.s.txt == "a"